JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 668641
  • Score
    100M100P100Q194741F
  • License MIT

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

Package Exports

  • @total-typescript/ts-reset
  • @total-typescript/ts-reset/array-includes
  • @total-typescript/ts-reset/array-index-of
  • @total-typescript/ts-reset/dom
  • @total-typescript/ts-reset/fetch
  • @total-typescript/ts-reset/filter-boolean
  • @total-typescript/ts-reset/is-array
  • @total-typescript/ts-reset/json-parse
  • @total-typescript/ts-reset/map-constructor
  • @total-typescript/ts-reset/map-has
  • @total-typescript/ts-reset/package.json
  • @total-typescript/ts-reset/promise-catch
  • @total-typescript/ts-reset/recommended
  • @total-typescript/ts-reset/set-has
  • @total-typescript/ts-reset/storage
  • @total-typescript/ts-reset/utils

Readme

TS Reset - Improved TypeScript's Built-in Typings

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