npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

typescript-baseline-lib

v0.1.0

Published

Baseline widely available JavaScript declarations for TypeScript.

Readme

typescript-baseline-lib

Generated baseline declarations for TypeScript.

This package is produced by the TypeScript-Baseline-lib-generator repo. It packages TypeScript-declarable JavaScript features that are Baseline widely available as a single global declaration bundle.

Current snapshot:

  • Supported TypeScript versions: >=6 <8
  • Baseline date: 2026-07-21
  • TypeScript package: 7.0.2
  • web-features package: 3.34.1
  • web-features gitHead: c8b4c88e92fe9f49168371f766358bea6a4f18ab
  • Included compat rows: 705
  • Selected declaration units: 1909
  • Transformed units: 2

Best-practice setup

Stock TypeScript doesn't treat "baseline" as a built-in lib yet. Install the current supported TypeScript major with this package:

npm install --save-dev typescript@^7 typescript-baseline-lib

The package also supports existing TypeScript 6.x projects within >=6 <8. TypeScript remains an optional peer dependency.

The same snapshot facts are available to tools through typescript-baseline-lib/snapshot.json.

Use the package as the complete global lib:

{
  "compilerOptions": {
    "noLib": true,
    "strict": true,
    "types": ["typescript-baseline-lib"]
  }
}
npx tsc --noEmit

Now only the supported Baseline widely available JavaScript surfaces type-check; APIs that haven't reached Baseline yet are reported as errors.

This package replaces TypeScript's default libs; do not set compilerOptions.lib or combine it with the standard es* libs. Add other ambient type packages to types only when the project needs them. Those packages can require runtime APIs outside the selected Baseline target. The package preserves erased declarations needed by TypeScript, but it does not expose unavailable APIs merely to satisfy a third-party package.

Allow a polyfilled feature

When the runtime loads an audited polyfill, add its generated web-features entry after the base package. For example, core-js can provide Promise.withResolvers at runtime:

import "core-js/proposals/promise-with-resolvers";
{
  "compilerOptions": {
    "noLib": true,
    "types": [
      "typescript-baseline-lib",
      "typescript-baseline-lib/allow/promise-withresolvers"
    ]
  }
}

Only explicitly audited entries are public. Published entry paths remain valid after all of their compat keys become Baseline widely available and move into the base package. Limited availability features with baselineStatus: false are rejected.

Target a Baseline year

Baseline year targets contain the cumulative JavaScript features that were Baseline newly available by the end of a completed calendar year. For example, Baseline 2024 includes Promise.withResolvers:

{
  "compilerOptions": {
    "noLib": true,
    "types": ["typescript-baseline-lib/year/2024"]
  }
}

Year entrypoints are generated from each compat row's baselineLowDate. They are independent alternatives to the widely available base entrypoint, not additions to it. The current year is omitted until it is complete. Targets before 2020 remain an implementation limitation because their TypeScript declaration graph currently pulls symbols from later years.

Do not combine a year/* entrypoint with the base package or an allow/* entrypoint. Each year file is a complete historical target, while allow/* additions are generated only for the current widely available base.

Each year contract reports declaration-backed compat keys and explicitly managed upstream gaps in reports/generation.json. The generator never fabricates declarations for behavior that TypeScript cannot model.

Year boundaries apply to runtime JavaScript APIs. Erased TypeScript helper types come from the pinned TypeScript toolchain and are not historical runtime features.

Notes

  • The base public surface is a single baseline lib.
  • Audited allow/* entrypoints are optional additions for explicitly polyfilled APIs.
  • Completed cumulative Baseline year entrypoints are independent alternatives to the base lib.
  • The current scope is javascript.builtins.* plus the arguments object.
  • The generated declarations are derived from the npm typescript package and preserve the upstream Microsoft license notice.