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

@core-js/types

v4.0.0-alpha.1

Published

TypeScript types for core-js

Readme

logo

This package contains types for the global and pure versions of core-js. Although core-js is a JavaScript standard library polyfill, the built-in TypeScript types are often not sufficient. Additional types are needed for:

  • features that are already in JavaScript but not yet in TypeScript’s standard types;
  • proposals, including those already implemented in JavaScript engines;
  • explicit imports of features from the pure version.

It is shipped as a separate package because we cannot guarantee stable behavior with future TypeScript releases, including minor ones.

Installation

npm install --save @core-js/[email protected]

Usage

You must include at least the ES6 types in your tsconfig.json because our types are built on top of the ES6 type definitions and DOM lib for the global version if you use something related (see DOM types section):

{
  "compilerOptions": {
    "lib": [
      "es2025",
      "dom"
    ],
    "types": [
      "@core-js/types"
    ]
  }
}

You can also import the types directly into your files instead of specifying core-js types in your tsconfig.json:

import '@core-js/types';

@core-js/types includes all types and entry points for the global version, but it is recommended to select only the subset you actually use.

Usage of subsets

There are four main subsets:

  • @core-js/types/actual - types for all actual features, including stable ECMAScript, web standards and Stage 3 ECMAScript proposals;
  • @core-js/types/es - types for stable ECMAScript features only;
  • @core-js/types/stable - types for stable ECMAScript and web standards features;
  • @core-js/types/full - types for all features, including proposals.

You can import them the same way as the main package. For example, to use only the stable subset, add this to your tsconfig.json:

{
  "compilerOptions": {
    "types": [
      "@core-js/types/stable"
    ]
  }
}

or import it directly in your files:

import '@core-js/types/stable';

Usage of specific features

If you need types only for specific features, you can import them like this:

{
  "compilerOptions": {
    "types": [
      "@core-js/types/proposals/joint-iteration",
      "@core-js/types/web/structured-clone"
    ]
  }
}

or import them directly in your files:

import '@core-js/types/proposals/joint-iteration';
import '@core-js/types/web/structured-clone';

You can find types for specific features on the corresponding pages in the documentation.

Types for the pure version

Base usage

Add this to your tsconfig.json, keeping in mind that ES types (at least ES6) are required:

{
  "compilerOptions": {
    "lib": [
      "es2025"
    ],
    "types": [
      "@core-js/types/pure"
    ]
  }
}

Then, when you import from the pure entry points, the corresponding types are picked up automatically:

import $findLast from '@core-js/pure/full/array/find-last';

$findLast([1, 3, 4, 2], v => v > 2); // => 4

Namespace usage in the pure version

If you need to use multiple methods from the same namespace, you can add @core-js/types/pure to tsconfig.json and import the entire namespace:

import $array from '@core-js/pure/full/array';

$array.findLast([1, 3, 4, 2], v => v > 2);
$array.flatMap([1, 2, 3], x => [x, x * 2]);

(note that this is not recommended since tree shaking does not properly work in this case)

DOM types

Some of the global types for web standards work correctly only with the DOM lib. You need to add DOM types to the lib section of your tsconfig.json in addition to @core-js/types. For example:

{
  "compilerOptions": {
    "types": [
      "@core-js/types"
    ],
    "lib": [
      "es2025",
      "dom"
    ]
  }
}

In the pure version, you can use these types without adding the DOM lib.