Skip to content

A 'CSS reset' for TypeScript, improving types for common JavaScript API's

License

Notifications You must be signed in to change notification settings

ImLunaHey/ts-reset

 
 

Repository files navigation

TS Reset - Improved TypeScript's Built-in Typings

Without ts-reset:

  • 🚨 .json (in fetch) and JSON.parse both return any
  • 🤦 .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 (in fetch) and JSON.parse both return unknown
  • .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

About

A 'CSS reset' for TypeScript, improving types for common JavaScript API's

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%