A 'CSS reset' for TypeScript, improving types for common JavaScript API's
MIT License
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