Socket
Socket
Sign inDemoInstall

@total-typescript/ts-reset

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@total-typescript/ts-reset - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

6

CHANGELOG.md
# @total-typescript/ts-reset
## 0.2.1
### Patch Changes
- Readme tweak
## 0.2.0

@@ -4,0 +10,0 @@

2

package.json
{
"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...

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc