@total-typescript/ts-reset
Advanced tools
Comparing version 0.2.0 to 0.2.1
# @total-typescript/ts-reset | ||
## 0.2.1 | ||
### Patch Changes | ||
- Readme tweak | ||
## 0.2.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@total-typescript/ts-reset", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A CSS reset for TypeScript, improving types for common JavaScript API's", | ||
@@ -5,0 +5,0 @@ "private": false, |
# `ts-reset` | ||
`ts-reset` acts like a CSS reset for TypeScript. It improves typings for JavaScript API's like `fetch`, `JSON.parse` and `.filter()`, making them safer and smarter. | ||
Whenever you add TypeScript to a project, you're opting into over tens of thousands of lines of declaration files. These files help describe JavaScript itself - `lib.dom.d.ts` describes the DOM, and `lib.d.ts` describes JavaScript itself. | ||
These typings are not perfect. | ||
- `.json` (in `fetch`) and `JSON.parse` both return `any` | ||
- `.filter(Boolean)` doesn't behave how you expect | ||
- `array.includes` often breaks | ||
`ts-reset` smooths over these hard edges, just like a CSS reset does in the browser. | ||
```ts | ||
@@ -6,0 +14,0 @@ // Import in a single file, then across your whole project... |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10908
224