Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattpocock/ts-reset
A 'CSS reset' for TypeScript, improving types for common JavaScript API's
https://github.com/mattpocock/ts-reset
reset typescript
Last synced: 4 days ago
JSON representation
A 'CSS reset' for TypeScript, improving types for common JavaScript API's
- Host: GitHub
- URL: https://github.com/mattpocock/ts-reset
- Owner: mattpocock
- License: mit
- Created: 2023-02-19T14:01:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T07:42:41.000Z (3 months ago)
- Last Synced: 2024-12-31T08:08:16.119Z (11 days ago)
- Topics: reset, typescript
- Language: TypeScript
- Homepage: https://www.totaltypescript.com/ts-reset
- Size: 303 KB
- Stars: 7,956
- Watchers: 18
- Forks: 124
- Open Issues: 54
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome - mattpocock/ts-reset - A 'CSS reset' for TypeScript, improving types for common JavaScript API's (TypeScript)
- jimsghstars - mattpocock/ts-reset - A 'CSS reset' for TypeScript, improving types for common JavaScript API's (TypeScript)
README
![TS Reset - Improved TypeScript's Built-in Typings](https://raw.githubusercontent.com/mattpocock/ts-reset/main/og-image.png)
**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](https://totaltypescript.com/ts-reset)