# mattpocock/ts-reset

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

Repository: https://github.com/mattpocock/ts-reset
Canonical: https://ross.abutalabs.com/products/ts-reset
Homepage: https://www.totaltypescript.com/ts-reset
Language: TypeScript
License: MIT
License Family: permissive
Topics: reset, typescript
Last push: 2026-04-01T13:30:54+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 75, release rhythm 8, longevity 92
- inputs: {"age_days": 1291, "days_push": 154, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8592, forks 146 (observed 2026-08-28T04:10:23.686283+00:00)

## What it is
A 'CSS reset' for TypeScript that improves the built-in typings for common JavaScript APIs like JSON.parse, fetch's .(), .filter(Boolean), and array.includes. It is imported once in a declaration file to apply safer, more ergonomic types across an entire project.

## Use cases
- make JSON.parse return unknown instead of any
- make fetch response .() return unknown
- make .filter(Boolean) narrow array types correctly
- fix array.includes errors on readonly arrays
- make localStorage and sessionStorage return unknown
- improve TypeScript's built-in lib typings project-wide

## When to choose
- you want safer default typings for JSON parsing and fetch in a TypeScript project
- you're tired of any leaking in from JSON.parse and res.()
- you want .filter(Boolean) to narrow types without casts
- you want a single-import, opt-in set of improved built-in typings

## When to avoid
- you need strict control over every type declaration and don't want global ambient changes
- your project depends on the exact current behavior of the standard lib typings
- you're not using TypeScript

## Facets
- artifact type: library
- maturity: stable
- function: type-system, developer-tools
- domain: programming-languages, developer-tools, web-development
- platform: cross-platform
- tags: typescript, type-safety, typings, -parse, filter-boolean, nodejs

## Member repositories
- mattpocock/ts-reset (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:23.686283+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:26:12.708570+00:00, confidence not recorded.
  - readme: https://github.com/mattpocock/ts-reset (fetched 2026-08-28T04:10:23.686283+00:00, sha 530e59eb463b)
  - homepage: https://www.totaltypescript.com/ts-reset (fetched 2026-08-29T08:26:47.622937+00:00, sha a9be55863e07)
  - site_page: https://www.totaltypescript.com/faq (fetched 2026-08-29T08:26:47.625375+00:00, sha c9fd3e83ac30)
- Data as of 2026-08-30T08:39:29.467469+00:00.
