ts-reset

A 'CSS reset' for TypeScript, improving types for common JavaScript API's
GitHub
7.89k
Created 2 years ago, last commit a month ago
10 contributors
143 commits
Stars added on GitHub, month by month
10
11
12
1
2
3
4
5
6
7
8
9
2023
2024
Stars added on GitHub, per day, on average
Yesterday
+4
Last week
+2.3
/day
Last month
+1.9
/day
Last 12 months
+2.5
/day
Package on NPM
Monthly downloads on NPM
10
11
12
1
2
3
4
5
6
7
8
9
2023
2024
No dependencies
README

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