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-newly-available

v1.0.20260919

Published

DOM types for web APIs that are Baseline "Newly available"

Readme

@baseline-types/dom-newly-available - DOM types for Baseline Newly available

This package contains the DOM types for the web APIs that are currently Baseline Newly available. Unlike the per-year @baseline-types/dom-<year> packages, it is not frozen to a fixed year — it tracks the latest Baseline state and moves forward as more APIs reach Newly available. It is a drop-in replacement for @types/web / the built-in dom library that lets you pin your project to the newly available web platform surface 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 Newly available set. The cut is referentially closed, so the output is a valid superset of the strict "Baseline Newly available" set (an API that depends on a type which is not yet newly available 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-newly-available --save-dev
pnpm add @typescript/lib-dom@npm:@baseline-types/dom-newly-available --save-dev
yarn add @typescript/lib-dom@npm:@baseline-types/dom-newly-available --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 are Baseline Newly available.

  1. Install the dependency: npm install @baseline-types/dom-newly-available --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 Newly available" means here

  • An API is included if its Baseline status is Newly available as of the underlying browser-compat-data snapshot. "Newly available" means every core browser has shipped it (baseline_low_date); "Widely available" additionally means ~30 months have passed since then (baseline_high_date).
  • The cut moves over time: each data refresh can promote more APIs into this set (and, for the newly-available cut, some of those APIs later also appear in the widely-available cut).
  • 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 Baseline state 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.20260919 at https://github.com/uhyo/TypeScript-Baseline-Types/releases/tag/%40baseline-types%2Fdom-newly-available%401.0.20260919.