ts-reset

A 'CSS reset' for TypeScript, improving types for common JavaScript API's
GitHub
8.14k
Created 2 years ago, last commit 7 months ago
11 contributors
146 commits
Stars added on GitHub, month by month
5
6
7
8
9
10
11
12
1
2
3
4
2024
2025
Stars added on GitHub, per day, on average
Yesterday
+5
Last week
+9.7
/day
Last month
+3.0
/day
Last 12 months
+1.4
/day
npmPackage on NPM
Monthly downloads on NPM
5
6
7
8
9
10
11
12
1
2
3
4
2024
2025
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