Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/total-typescript/ts-reset

A 'CSS reset' for TypeScript, improving types for common JavaScript API's
https://github.com/total-typescript/ts-reset

reset typescript

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

![TS Reset - Improved TypeScript's Built-in Typings](./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)