mattpocock/ts-reset
View on GitHub ↗ ★ 8,639 TypeScript
A 'CSS reset' for TypeScript, improving types for common JavaScript API's
9 mentions on Hacker News by 8 people: 4 stories, 5 comments · first 2023-02-20 · latest 2024-01-31
20082026
-
you can improve it a bit with the library ts-reset https://github.com/total-typescript/ts-reset
comment by EvertBouw · 2024-01-31 · in Adding type safety to object IDs in TypeScript -
You might like TS Reset: https://github.com/total-typescript/ts-reset , which fixes this particular problem. I don't personally find it to be a big issue though. Regarding runtime type checking, if you were to write something that can…
comment by kristiandupont · 2023-06-24 · in Why doesn't TypeScript properly type Object.keys? -
…I've suggested such info could be mentioned in the project [0] and author sees as "too niche". [0] https://github.com/total-typescript/ts-reset/issues/93
comment by myfonj · 2023-03-03 · in A 'CSS reset' for TypeScript, improving types for common JavaScript API's -
…path="./ts-reset-0.3.7/src/entrypoints/recommended.d.ts"/> // = contents of the archive from // https://github.com/total-typescript/ts-reset/releases const allCurrencies = /** @type {const} */(["EUR", "USD"]); /** * @typedef {typeof…
comment by myfonj · 2023-03-03 · in A 'CSS reset' for TypeScript, improving types for common JavaScript API's -
Reading https://github.com/total-typescript/ts-reset/blob/main/src/e... , I'm more confused than before. The generic NonFalsy<T>[] looks to me like it should evaluate to never[] if the entire array is false, and to T[] (the original array…
comment by mrblampo · 2023-03-03 · in A 'CSS reset' for TypeScript, improving types for common JavaScript API's