A 'CSS reset' for TypeScript, improving types for common JavaScript API's
A 'CSS reset' for TypeScript, improving types for common JavaScript API's
Without ts-reset:
.json (in fetch) and JSON.parse both return any.filter(Boolean) doesn't behave how you expectarray.includes often breaks on readonly arraysts-reset smooths over these hard edges, just like a CSS reset does in the browser.
With ts-reset:
.json (in fetch) and JSON.parse both return unknown.filter(Boolean) behaves EXACTLY how you expectarray.includes is widened to be more ergonomicCheck out our docs page on Total TypeScript
0.7.0 release
Add docs for integrating with AGENTS.md
1.0 release
Make `dateObject.toISOString().split("T")[0]` return `string` instead of `string | undefined`
undocumented features
custom filter callback not inferred when rule applied
`.filter()` can't handle union of arrays
Array#includes overload doesn't work on arrays over generic types (`T[]`)
Array.isArray problem with narrowed type
Array `.at()` on readonly tuples