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

@baseline-types/dom-2024

v1.0.20260712

Published

DOM types for web APIs that reached Baseline "Newly available" by 2024

Downloads

729

Readme

@baseline-types/dom-2024 - DOM types frozen to Baseline 2024

This package contains the DOM types for the web APIs that reached Baseline Newly available status in 2024 or earlier. It is a drop-in replacement for @types/web / the built-in dom library that lets you pin your project to the web platform surface that was broadly available by a given year, instead of always tracking the latest specs.

The types are generated from the same spec data (@webref/idl + @mdn/browser-compat-data) as @types/web, then cut down with compute-baseline to the Baseline 2024 set. The cut is referentially closed, so the output is a valid superset of the strict "Baseline ≤ 2024" set (an older API that depends on a type which only reached Baseline later keeps that type).

Installation

With TypeScript 4.5+ using lib replacement, swap the built-in DOM lib for this package:

npm install @typescript/lib-dom@npm:@baseline-types/dom-2024 --save-dev
pnpm add @typescript/lib-dom@npm:@baseline-types/dom-2024 --save-dev
yarn add @typescript/lib-dom@npm:@baseline-types/dom-2024 --dev

If you are using TypeScript 6.0+, set libReplacement to true in your tsconfig.json.

That's all — your project now sees only the DOM APIs that were Baseline Newly available by 2024.

  1. Install the dependency: npm install @baseline-types/dom-2024 --save-dev.

  2. Update your tsconfig.json. There are two cases depending on whether you have lib defined.

    1. Without "lib" - Add "lib": [] plus the entry matching your "target" (e.g. "lib": ["es2017"] for "target": "es2017").
    2. With "lib" - Remove "dom".

Removing "dom" lets this package provide the global declarations instead.

What "Baseline 2024" means here

  • Newly available, not Widely available: an API is included if every core browser shipped it by the end of 2024 (baseline_low_date).
  • A few references that can't be satisfied in a given scope (e.g. an enum whose only interface was cut) are degraded to any.
  • When unsure whether an API has Baseline data at all (e.g. WebAssembly), it is kept rather than dropped.

SemVer

This project does not respect semantic versioning — the underlying spec data and Baseline computation change over time, and any update could add or remove types. The year in the package name is the stable axis. The version's patch component is the release date (1.0.YYYYMMDD, e.g. 1.0.20260707), so the version simply records the day each data refresh was cut.

Deploy Metadata

You can read what changed in version 1.0.20260712 at https://github.com/uhyo/TypeScript-Baseline-Types/releases/tag/%40baseline-types%2Fdom-2024%401.0.20260712.