npm.io
0.6.1 • Published 1 year ago

@total-typescript/ts-reset

Licence
MIT
Version
0.6.1
Deps
0
Size
179 kB
Vulns
0
Weekly
0
Stars
8.5K

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