@total-typescript/ts-reset
v0.6.1
Published
A CSS reset for TypeScript, improving types for common JavaScript API's
Downloads
1,554,755
Readme
Without ts-reset
:
- 🚨
.json
(infetch
) andJSON.parse
both returnany
- 🤦
.filter(Boolean)
doesn't behave how you expect - 😡
array.includes
often breaks on readonly arrays
ts-reset
smooths over these hard edges, just like a CSS reset does in the browser.
With ts-reset
:
- 👍
.json
(infetch
) andJSON.parse
both returnunknown
- ✅
.filter(Boolean)
behaves EXACTLY how you expect - 🥹
array.includes
is widened to be more ergonomic - 🚀 And several more changes!
Official Docs
Check out our docs page on Total TypeScript