Use this configuration option to add custom reporters to Jest
reporters: [
'<rootDir>/tests/reporter.js',
],Use this configuration option to add custom reporters to Jest
reporters: [
'<rootDir>/tests/reporter.js',
],microsoft/TypeScript#15300 (comment)
Something that can help considerably with this issue is to use the following type:
export type Typify<T> = { [ K in keyof T ]: T[ K ] };
Показал тут на днях гоферам и пхпшникам кусок кода, который рендерит табличку. Их языки не позволяют творить такие штуки со статической типизацией. Матерились и говорили, что мы (кто пишет на тс) ебанутые, что это сложно, что «эта ваша математика на типах от того, что вы нихера не понимаете в программировании». Когда объяснил, как работает, сказали «а, ну да, красиво».
это вообще офигенная штука — в react-table и rc-table (из and.design) так же сделано — можно указать только accessor'ры для существующих полей в строке таблицы. на бэке поменялась DTO-шка, на фронте упало с ошибкой компиляции.
посмотрел код . я 5лет писал на C#. сейчас год работаю typescript+angular. по моему мнению typescript позволяет делать легко фантастические вещи с типами . просто какая то магия . конечно можно и с помощью C# подобные штуки вертеть . но кода-затраты будут гораздо выше .
| const http = require('http'); | |
| var querystring = require('querystring'); | |
| const { performance } = require('perf_hooks'); | |
| const t1 = performance.now(); | |
| var post_data = querystring.stringify({}); | |
| // An object of options to indicate where to post to | |
| var post_options = { | |
| host: 'localhost', |
При составлении карты использовались материалы Максима Дорофеева, mnogosdelal.ru
| // <textarea rows="3" v-textarea-autoheight></textarea> | |
| const textareaAutoheight = { | |
| autoHeight(el) { | |
| el.style.height = "auto"; // Revert height | |
| const style = window.getComputedStyle(el); | |
| const borderTop = parseFloat(style.getPropertyValue("border-top-width")); | |
| const borderBottom = parseFloat(style.getPropertyValue("border-bottom-width")); | |
| el.style.height = el.scrollHeight + borderTop + borderBottom + "px"; | |
| }, |
| // ==UserScript== | |
| // @name Video hotkeys for VK, Rutube, Boosty - fast forward and rewind | |
| // @namespace pongo | |
| // @version 2024-10-30 | |
| // @description Adds hotkeys for fast forwarding (key D) and rewinding (key A) videos by 1 second on VK and Boosty. Press alt+c for copy current timecode. | |
| // @author pongo | |
| // @match https://vk.com/video-* | |
| // @match https://boosty.to/*/posts/* | |
| // @match https://rutube.ru/video/* | |
| // @grant GM_setClipboard |
| scoop list | %{scoop info $_.Name} | Select-Object -Property Name, Website, Description | Export-Csv -Path .\Desktop\scoopp.csv |