Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
315 commits
Select commit Hold shift + click to select a range
2040ed9
Types refactoring
slowcheetah Nov 20, 2025
4abe163
Split included types depending on TypeScript version
slowcheetah Nov 21, 2025
532bdcc
Added proposal type entry-points & tests
slowcheetah Nov 21, 2025
ce74d2c
Pure types
slowcheetah Dec 3, 2025
f4db8b3
Refactoring & tests
slowcheetah Dec 3, 2025
f7d7253
Pure types refactoring & some improvements
slowcheetah Dec 5, 2025
38dd1b1
All & partial type definitions test commands
slowcheetah Dec 8, 2025
ee0a1c1
package.json builder for types
slowcheetah Dec 8, 2025
f7e913f
Run all type definition tests in CI
slowcheetah Dec 8, 2025
2f99da5
Sort exports
slowcheetah Dec 8, 2025
595bfdc
Types dir refactoring & some fixes & some improvements
slowcheetah Dec 9, 2025
8fb3711
Fix not existing src path
slowcheetah Dec 9, 2025
264b470
Fix lib paths & add module name variations & remove config
slowcheetah Dec 9, 2025
c4bec53
Move test type definitions to own CI job
slowcheetah Dec 9, 2025
68e2fa7
Add index.d.ts & rebuild all type entry points & move test-type-defin…
slowcheetah Dec 10, 2025
4c449f5
Build types refactoring
slowcheetah Dec 10, 2025
7b56f76
Types package refactoring
slowcheetah Dec 10, 2025
155a508
update lockfiles
zloirock Dec 12, 2025
a53e0d7
don't store generated package.json
zloirock Dec 14, 2025
8319e1f
common types renamed & added type entries for annex-b and web
slowcheetah Dec 15, 2025
7b3dcbd
Added Object.__proto__ accessor type
slowcheetah Dec 15, 2025
e6c8ad7
Types README.md
slowcheetah Dec 15, 2025
7f5e4e4
Build types refactoring
slowcheetah Dec 16, 2025
39efd88
Iterable DOM collections types
slowcheetah Dec 16, 2025
3d5c7d0
Build types refactoring
slowcheetah Dec 17, 2025
1ae39a1
Update README.md
slowcheetah Dec 18, 2025
b2a5435
Remove proposal stages from types & add some TSDocs
slowcheetah Dec 18, 2025
ff30dae
Update README.md
slowcheetah Dec 18, 2025
f663cde
Update TSDocs for __proto__
slowcheetah Dec 18, 2025
68c5200
Update README.md
slowcheetah Dec 18, 2025
0e9dde2
Update README.md
slowcheetah Dec 18, 2025
5b04cc5
TypeScript type defintions docs for website
slowcheetah Dec 18, 2025
66dbf8a
Fix TSDocs
slowcheetah Dec 19, 2025
6c9753a
Fix structured clone docs
slowcheetah Dec 19, 2025
e4561d3
Add update types README.md in update-version script
slowcheetah Dec 19, 2025
b9f883c
Add missing type declarations & remove unnecessary type declarations
slowcheetah Dec 19, 2025
c0f9766
Update README.md and TypeScript type definitions doc
slowcheetah Dec 19, 2025
5d54a68
Types stabilization
slowcheetah Dec 22, 2025
2ff6c96
Types for TS 5.5 stabilization
slowcheetah Dec 22, 2025
69fe0e2
Update ES in README.md to actual
slowcheetah Dec 23, 2025
e3915e5
Types stabilization for TS <= 5.5
slowcheetah Dec 23, 2025
04ac416
Fix prototype template
slowcheetah Dec 24, 2025
e56fe0a
Add test for prototype methods without generics
slowcheetah Dec 26, 2025
55b03a8
Update clearImmediate type & tests for Bun|Node compatibility
slowcheetah Dec 26, 2025
f5e03cc
Add comment explaining why Bun tests are disabled
slowcheetah Dec 26, 2025
0e6b53f
Code improvements
slowcheetah Dec 26, 2025
92fd2fd
Types coverage
slowcheetah Dec 29, 2025
68ed547
Imports in tests refactoring
slowcheetah Dec 30, 2025
7feee80
Return our own Promise type in pure types
slowcheetah Jan 5, 2026
6263fcf
Return our own types in pure types
slowcheetah Jan 6, 2026
9f81aed
Fix package-lock.json
slowcheetah Jan 6, 2026
0841bae
Update ts type definitions site docs
slowcheetah Jan 7, 2026
9a2d824
Add motivation for old TS types
slowcheetah Jan 7, 2026
ff24172
Check promise like types
slowcheetah Jan 8, 2026
787a95f
Change returning types from Iterable to IterableIterator
slowcheetah Jan 8, 2026
2a96a35
Fix Math.sumPrecise type
slowcheetah Jan 8, 2026
da7287e
Self test
slowcheetah Jan 8, 2026
f5f803b
Fix String.dedent type
slowcheetah Jan 8, 2026
4eb94d9
Fix CoreJSIteratorObject type & add returning types check
slowcheetah Jan 8, 2026
b483ee3
Some fixes & improvements
slowcheetah Jan 8, 2026
1a3e83e
Fix motivation comments for 5.5- pure types
slowcheetah Jan 8, 2026
4627b28
Improve returning types checking & fix iterator-helpers types
slowcheetah Jan 8, 2026
ff7d13e
Fix String dedent
slowcheetah Jan 8, 2026
be0a276
Fix String dedent
slowcheetah Jan 9, 2026
7b1715a
Fix Symbols
slowcheetah Jan 9, 2026
fc37722
Improve type tests
slowcheetah Jan 9, 2026
d6c035c
Fix unique symbols
slowcheetah Jan 9, 2026
3230cda
Add type check for AsyncIterator
slowcheetah Jan 9, 2026
a9e91b4
Fix exit in type checker
slowcheetah Jan 10, 2026
83f8c55
Improve test for AsyncIterator in pure version
slowcheetah Jan 10, 2026
75a22c2
enable base lining for ts
zloirock Jan 11, 2026
3401989
Error cause
slowcheetah Jan 11, 2026
77f862c
Rollback Error entry point
slowcheetah Jan 11, 2026
9bb17a0
Add toAsync type checking
slowcheetah Jan 11, 2026
ad395d9
Add async iteration test & move core-js types for pure version to cor…
slowcheetah Jan 11, 2026
c21dbb3
Improve async iteration test
slowcheetah Jan 11, 2026
d5ed61b
Add types for ReadonlyArray methods
slowcheetah Jan 11, 2026
5740722
Specific tests for some envs
slowcheetah Jan 11, 2026
2381e23
Type tests folder refactoring
slowcheetah Jan 11, 2026
3df1518
Type definitions contributing skeleton
slowcheetah Jan 11, 2026
b3fd1a8
Running local type tests in parallel
slowcheetah Jan 12, 2026
3a01e6a
Add async iteration test for pure version
slowcheetah Jan 12, 2026
ddeb9a9
Fallbacks for DOM
slowcheetah Jan 13, 2026
e9f9b99
Enable URLSearchParams tests & some web types & tests improvements
slowcheetah Jan 15, 2026
582e63d
Type tests runner refactoring
slowcheetah Jan 15, 2026
8c914bd
Type tests runner refactoring
slowcheetah Jan 19, 2026
21a5da8
update dependencies
zloirock Jan 21, 2026
53e963a
Types linting: interfaces
slowcheetah Jan 22, 2026
7065a3c
Types linting: TSDocs
slowcheetah Jan 22, 2026
ed78178
Exclude type's export ability
slowcheetah Jan 23, 2026
8f17ab3
Improve types tests & fix Iterator#concat type
slowcheetah Jan 26, 2026
3529825
TS 5.5 stabilization
slowcheetah Jan 27, 2026
3fa0fb9
use @ in @type-options directive
slowcheetah Jan 27, 2026
35c14b3
use @ in @types and @no-types directive
slowcheetah Jan 27, 2026
3c82b62
Build pure types script refactoring
slowcheetah Jan 27, 2026
3ba11d2
Update Types title in CONTRIBUTING.md
slowcheetah Jan 27, 2026
e812c3d
Build pure types script refactoring
slowcheetah Jan 27, 2026
164309a
Iterator & AsyncIterator types refactoring
slowcheetah Jan 28, 2026
2cb3b51
Build pure types script refactoring
slowcheetah Jan 28, 2026
80f93c3
Disable types for TS 5.5-
slowcheetah Jan 30, 2026
52bc702
Build entries and types scripts refactoring
slowcheetah Jan 30, 2026
530974a
Remove redundant entries definition & type dependencies
slowcheetah Jan 30, 2026
0f8665b
`.sort` -> `.toSorted`
zloirock Jan 31, 2026
1c4d465
add `WeakSet` to `getGenericsForNamespace` for consistency with `Weak…
zloirock Jan 31, 2026
d50f647
URL types refactoring
slowcheetah Feb 2, 2026
a1a6448
Add recursive type collection
slowcheetah Feb 2, 2026
6808ab7
Type dummy
slowcheetah Feb 2, 2026
6b06f4d
Fix options decomposition
slowcheetah Feb 3, 2026
3a510f2
declare some types dependencies
zloirock Feb 3, 2026
f4d0bf4
Entries namespaces tests & build-types script improvements
slowcheetah Feb 3, 2026
51ebec8
Add tests for imported global types & some tests improvements
slowcheetah Feb 4, 2026
0afd60d
Update feature namespaces in type tests according to support
slowcheetah Feb 5, 2026
d346926
Separate entries types tests
slowcheetah Feb 5, 2026
ecee37b
Add import variations tests
slowcheetah Feb 5, 2026
8590e58
Types for configurator
slowcheetah Feb 5, 2026
3390b53
Rename new tests
slowcheetah Feb 5, 2026
7616ade
Revert "Rename new tests"
slowcheetah Feb 5, 2026
e5a53a4
Types for configurator
slowcheetah Feb 5, 2026
b6b3c90
Add annex-b tests
slowcheetah Feb 5, 2026
7d24f81
Rename entries tests
slowcheetah Feb 5, 2026
79cd8a1
update after rebasing
zloirock Feb 8, 2026
3b260e3
add types for `Object.keysLength`
zloirock Feb 8, 2026
7371bde
simplify type definitions tests runner config, rework runner and chan…
zloirock Feb 8, 2026
ad895a1
move tools definitions tests to a separate directory
zloirock Feb 8, 2026
d7be130
enable testing without `dom` library on ci
zloirock Feb 8, 2026
b00299b
add node 22 to types tests matrix
zloirock Feb 8, 2026
3b2c096
refactor type definitions tests runner
zloirock Feb 8, 2026
0480d06
refactor type definitions tests runner
zloirock Feb 8, 2026
fb76ca6
add TS6 to tests
zloirock Feb 8, 2026
0f95954
Fix SharedArrayBuffer conflict in TS < 5.9 and @types/node@25
slowcheetah Feb 9, 2026
967be56
Fix SharedArrayBuffer conflict in TS < 5.9 and @types/node@25 in pure…
slowcheetah Feb 10, 2026
5a1e978
Some improvements
slowcheetah Feb 10, 2026
49b32c0
Update envs list for local tests
slowcheetah Feb 11, 2026
8311f4f
Add exports to compat's package.json & make builder export in ESM sty…
slowcheetah Feb 9, 2026
ec4f5e9
Update hack comment in array buffer transfer types
slowcheetah Feb 11, 2026
10b5bd6
Merge pull request #1512 from zloirock/v4-types-ts6
zloirock Feb 11, 2026
b64f03d
update ts6 to beta
zloirock Feb 12, 2026
2a29ddf
update dependencies
zloirock Feb 12, 2026
f9d901b
Types refactoring
slowcheetah Feb 12, 2026
2af328e
Types refactoring
slowcheetah Feb 12, 2026
b8cb287
Type definition helpers move & fix IteratorLike pure helper
slowcheetah Feb 16, 2026
174f39f
Extend {Map|WeakMap}Constructors from base constructors for pure version
slowcheetah Feb 16, 2026
77e8ddd
Fix async-iterator-helpers tests
slowcheetah Feb 16, 2026
5c2c6b5
Fix Iterable type in comments
slowcheetah Feb 16, 2026
131ec77
Add TReturn & TNext to all IteratorObject usages
slowcheetah Feb 16, 2026
5a3e6e7
Rename custom constructor for DOMException
slowcheetah Feb 16, 2026
23897f1
Fix URL.canParse & URL.parse argument type
slowcheetah Feb 16, 2026
354c820
Remove redundant custom type for String.replaceAll and fix type
slowcheetah Feb 16, 2026
f4329b4
Add @type-options documentation comment
slowcheetah Feb 16, 2026
e38fc11
AsyncIterator.reduce types improvements
slowcheetah Feb 17, 2026
e6d85ee
Fix iterator symbol fallback
slowcheetah Feb 18, 2026
f7fc04c
Add await to writeJson
slowcheetah Feb 18, 2026
00423c3
Fix `AsyncIterator.from` return type
slowcheetah Feb 18, 2026
815188e
Fix `Iterator.from` return type
slowcheetah Feb 18, 2026
3f09bff
Fix `Iterator#find` and `Iterator#filter` signatures
slowcheetah Feb 18, 2026
12042a7
Fix `Iterator#range` signatures
slowcheetah Feb 18, 2026
69ab953
Rollback `Iterator.from` return type
slowcheetah Feb 18, 2026
892bfad
Fix `Iterator#flatMap` type signature for pure version
slowcheetah Feb 18, 2026
1d6dce8
Fix Iterator joint proposal type signature
slowcheetah Feb 18, 2026
4218852
Prefixed custom types for array buffer base64
slowcheetah Feb 18, 2026
f970377
Add comment to dom-exception types
slowcheetah Feb 18, 2026
d1fd855
Clear imports for every breakpoint
slowcheetah Feb 18, 2026
10f77c2
Add default redirect to package.json for typeVersions
slowcheetah Feb 18, 2026
e0d0c07
Use custom symbols in pure version
slowcheetah Feb 18, 2026
71d92c8
Fix types & tests for iterable-dom-collections
slowcheetah Feb 18, 2026
1dc6495
Fix TSDocs for collection-of-from proposal
slowcheetah Feb 18, 2026
f506643
Update types for json parse with source proposal
slowcheetah Feb 18, 2026
ee74862
Update types for ReaonlyArray#filterReject
slowcheetah Feb 18, 2026
e422dc3
Fix callback return type of typed arrays filterReject methods
slowcheetah Feb 18, 2026
cb3187b
Use custom PromiseSettledResult
slowcheetah Feb 18, 2026
e79244b
Aligning the type of CoreJSAsyncIterator and CoreJSAsyncIteratorObject
slowcheetah Feb 18, 2026
c709171
Aligning the type of Iterator, IteratorObject, AsyncIteratorObject
slowcheetah Feb 18, 2026
4632ed7
Remove example from AsyncDisposableStack TSDocs & fix description
slowcheetah Feb 18, 2026
281e35c
Add pure pollutions test
slowcheetah Feb 18, 2026
75689ac
Remove proposal stage comments from types
slowcheetah Feb 18, 2026
2b38708
Iterator.range overloads improvements
slowcheetah Feb 18, 2026
5bb0dae
Iterator type alignment of 5.6 and 5.2 versions
slowcheetah Feb 18, 2026
ea87d02
AsyncIterator.reduce overloads improvements
slowcheetah Feb 18, 2026
3fb02a1
Iterator dom collections types & tests fixes
slowcheetah Feb 18, 2026
1760591
Add iterator joint proposal tests with strict mode
slowcheetah Feb 18, 2026
278e510
Add overload for Iterator.range with bigint
slowcheetah Feb 18, 2026
e24f73b
Linting fix
slowcheetah Feb 18, 2026
426a267
Iterator.zip test fix
slowcheetah Feb 18, 2026
bc25f29
Linting fix
slowcheetah Feb 18, 2026
edadffc
Type alignment of CoreJSIteratorObject
slowcheetah Feb 18, 2026
0ee753d
Fix pure pollutions test
slowcheetah Feb 18, 2026
828f1a6
Fix iterable dom collections types
slowcheetah Feb 19, 2026
8a479bc
Fix Iterator#find and Iterator#filter types & add tests
slowcheetah Feb 19, 2026
843dbda
Fix AsyncIterator#flatMap pure type
slowcheetah Feb 19, 2026
4d5ac1e
Fix AsyncIterator#reduce pure types & tests
slowcheetah Feb 19, 2026
babcdf3
Fix Array#uniqueBy tests
slowcheetah Feb 19, 2026
0324348
Fix JSON.parse type
slowcheetah Feb 19, 2026
9b608b9
Fix CoreJSReviverContext type
slowcheetah Feb 19, 2026
35eeba5
Fix Immediate type
slowcheetah Feb 19, 2026
2029c7d
Fix ReadonlyArray#findLast and ReadonlyArray#findLastIndex types
slowcheetah Feb 19, 2026
289da59
Fix Iterator.zip and Iterator.zipKeyed types
slowcheetah Feb 19, 2026
aaff7cd
Fix PromiseLike type
slowcheetah Feb 19, 2026
e0d4096
Fix Iterator pure types
slowcheetah Feb 19, 2026
5f88e5b
Add exit code to coverage script
slowcheetah Feb 19, 2026
2fde203
Fix regex
slowcheetah Feb 19, 2026
fc395e8
Fix Iterator.flatMap custom type fix
slowcheetah Feb 19, 2026
3f2b670
Fix coverage script
slowcheetah Feb 19, 2026
d2ede6e
Make IteratorObject iterable
slowcheetah Feb 20, 2026
e9f979f
Fix generics in AsyncIteratorObject & IteratorObject
slowcheetah Feb 20, 2026
21b4cf2
Fix collection of from proposal types & tests
slowcheetah Feb 20, 2026
b786585
Fix `Iterator.from` return type
slowcheetah Feb 20, 2026
0041581
Fix AsyncIterator types for pure versions
slowcheetah Feb 20, 2026
faf394b
Add separated type ZipKeyedOptions for Iterator.zipKeyed method
slowcheetah Feb 20, 2026
9b02a8a
Fix different PromiseLike types in AsyncIterator pure
slowcheetah Feb 20, 2026
42f3cb9
Fix generics in Promise.allKeyed & Promise.allSettledKeyed types
slowcheetah Feb 20, 2026
6015588
Fix String#replaceAll TSDocs
slowcheetah Feb 20, 2026
ae8e9e2
Fix Array#uniqueBy types
slowcheetah Feb 20, 2026
9ed3ae1
Fix import namespaces
slowcheetah Feb 20, 2026
30cb923
Add Promise.any & Promise.try to pure types
slowcheetah Feb 20, 2026
4eaa688
Fix package.json for core-js-types
slowcheetah Feb 20, 2026
26da940
Fix Promise TSDocs
slowcheetah Feb 20, 2026
d776863
Fix collection of-from TSDocs
slowcheetah Feb 20, 2026
67e7be8
Remove custom PromiseLike because it exists in ES6
slowcheetah Feb 20, 2026
a0d53e1
Add overload for custom WeakSet
slowcheetah Feb 20, 2026
c9f0d34
Add overload for Iterator.zip to keep generic types
slowcheetah Feb 20, 2026
a47a048
Make readonly rawJSON property in RawJSON type
slowcheetah Feb 20, 2026
d6d5e04
Add type guard to symbol predicates proposal
slowcheetah Feb 20, 2026
30fc406
Fix target & lib rules in test runner
slowcheetah Feb 20, 2026
eda4254
Add support for primitives in Promise.allKeyed & Promise.allSettledKe…
slowcheetah Feb 20, 2026
802491c
Fix Promise.allSettledKeyed pure type
slowcheetah Feb 20, 2026
a52c936
DOMException type aligned with pure and global versions
slowcheetah Feb 20, 2026
7d2dfaa
update dependencies
zloirock Feb 23, 2026
725c6b8
Fix subsets in build-types script
slowcheetah Feb 23, 2026
f166076
Fix AsyncIterator types
slowcheetah Feb 23, 2026
bd1876e
Fix `Iterator.range` return type
slowcheetah Feb 23, 2026
dab664f
Fix type `Iterator.zipKeyed` in pure version
slowcheetah Feb 23, 2026
2547771
Fix Uint32Array#toSorted TSDocs
slowcheetah Feb 23, 2026
980eeda
Fix collection of-from proposal types
slowcheetah Feb 23, 2026
3c17f5d
Promise types refactoring for pure version
slowcheetah Feb 23, 2026
97c6735
Reuse AsyncIterator type in Iterator for pure version
slowcheetah Feb 23, 2026
5593637
Fix references adjustment & no-export decorator
slowcheetah Feb 23, 2026
172d27f
Remove unused type
slowcheetah Feb 23, 2026
1c0b833
Fix `Iterator.concat` types & tests
slowcheetah Feb 24, 2026
7bf5d59
Fix `Symbol.iterator` for pure version
slowcheetah Feb 24, 2026
c695053
Fix es filter in build types script
slowcheetah Feb 24, 2026
65bb542
AsyncIterator.flatMap alignment & fix TSDocs
slowcheetah Feb 24, 2026
d433df5
Remove unsued type
slowcheetah Feb 24, 2026
03468f2
TSDocs fixes
slowcheetah Feb 24, 2026
5b3012b
AsyncIterator methods params alignment
slowcheetah Feb 24, 2026
541ec82
Build pure types script cosmetic improvements
slowcheetah Feb 24, 2026
af43973
update dependencies
zloirock Feb 25, 2026
1c4a145
fix some jsdoc and param names
zloirock Feb 25, 2026
a4ef5de
return `test-type-definitions` to `test raw`
zloirock Feb 25, 2026
f84d3ab
relax definitions tests matrix
zloirock Feb 25, 2026
69cd5ef
fix some jsdoc and param names
zloirock Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ jobs:
- run: pip install codespell
- run: npx run-s lint-raw codespell

type-definitions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 25
cache: npm
- run: npm run prepare-monorepo
- run: npx run-s build-types test-type-definitions-ci

karma:
runs-on: windows-2022
steps:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,19 @@ node_modules/
/packages/core-js-pure/proposals/
/packages/core-js-pure/stable/
/packages/core-js-pure/stage/
/packages/core-js-pure/index.js
/packages/core-js-pure/configurator.js
/packages/core-js-pure/index.js
/packages/core-js-pure/package.json
/packages/core-js-pure/LICENSE
/packages/core-js-types/package.json
/packages/core-js-types/ts*
/packages/core-js-types/LICENSE
/tests/**/bundles/
/tests/compat/*.jar
/tests/compat/compat-data.js
/tests/unit-global/index.js
/tests/unit-pure/index.js
/tests/type-definitions/tmp/
/website/templates/
/website/dist/
/website/src/public/
29 changes: 28 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ There is always some ["help wanted" issues](https://github.com/zloirock/core-js/
- For export the polyfill, in all common cases use [`internals/export`](./packages/core-js/modules/export.js) helper. Use something else only if this helper is not applicable - for example, if you want to polyfill accessors.
- If the code of the pure version implementation should significantly differ from the global version (*that's not a frequent situation, in most cases [`internals/is-pure`](./packages/core-js/modules/is-pure.js) constant is enough*), you can add it to [`packages/core-js-pure/override`](./packages/core-js-pure/override) directory. The rest parts of `@core-js/pure` will be copied from `core-js` package.
- Add the feature detection of the polyfill to [`tests/compat/tests.js`](./tests/compat/tests.js), add the compatibility data to [`packages/core-js-compat/src/data.mjs`](./packages/core-js-compat/src/data.mjs), how to do it [see below](#how-to-update-core-js-compat-data).
- Add it to entries definitions, see [`scripts/build-entries/entries-definitions.mjs`](./scripts/build-entries/entries-definitions.mjs).
- Add it to entries definitions, see [`scripts/build-entries-and-types/entries-definitions.mjs`](scripts/build-entries-and-types/entries-definitions.mjs).
- Add unit tests to [`tests/unit-global`](./tests/unit-global) and [`tests/unit-pure`](./tests/unit-pure).
- Add tests of entry points to [`tests/entries/unit.mjs`](./tests/entries/unit.mjs).
- Make sure that you are following [our coding style](#style-and-standards) and [all tests](#testing) are passed.
Expand Down Expand Up @@ -65,6 +65,33 @@ engine | how to run tests | base data inherits from | mandatory ch

If you have no access to all required browsers / versions of browsers, use [Sauce Labs](https://saucelabs.com/), [BrowserStack](https://www.browserstack.com/) or [Cloud Browser](https://ieonchrome.com/).

## TypeScript type definitions

- TypeScript definitions should be added to the [`packages/core-js-types/src/base`](./packages/core-js-types/src/base) directory.
- Our type definitions are built on top of ES6. If any related type is missing in ES6, it must be added to the [`packages/core-js-types/src/base/core-js-types`](./packages/core-js-types/src/base/core-js-types) directory and imported via triple-slash directives in your type definition file.
- Place your type definition into the folder that matches its kind ([`packages/core-js-types/src/base/proposals`](./packages/core-js-types/src/base/proposals), [`packages/core-js-types/src/base/web`](./packages/core-js-types/src/base/web)).
- Type definitions for the pure version are either generated from the global version types or created manually in the [`packages/core-js-types/src/base/pure`](./packages/core-js-types/src/base/pure) folder. Type build rules for the pure version can be modified using the `@type-options` directive:
- `no-extends` – do not extend the base type when adding a prefix to the type/interface
- `no-prefix` – do not add a prefix to the type/interface name
- `no-constructor` – use it when the type has no constructor (for example, `Math`)
- `export-base-constructor` – export the base type’s constructor instead of the prefixed one
- `no-export` – do not export this type
- `no-redefine` – do not redefine the type’s constructor
- `prefix-return-type` – add a prefix to the return type
- All type definitions must be covered by TSC tests. Add them to the [`tests/type-definitions`](./tests/type-definitions) directory.
- To build the types, run the command:
```sh
npm run build-types
```
- To test the types, run the command:
```sh
npm run test-type-definitions-all
```
- To run the fast subset of the types test, run the command:
```sh
npm run test-type-definitions-smoke
```

## Style and standards

The coding style should follow our [`eslint.config.js`](./tests/eslint/eslint.config.js). You can test it by calling [`npm run lint`](#testing). Different places have different syntax and standard library limitations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ class Object {
```plaintext
core-js/proposals/accessible-object-hasownproperty
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/accessible-object-hasownproperty`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/accessible-object-hasownproperty.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/array-deduplication.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ core-js(-pure)/full/array(/prototype)/unique-by
core-js/full/typed-array/unique-by
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-unique`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-unique.d.ts)

## Examples
```js
[1, 2, 3, 2, 1].uniqueBy(); // [1, 2, 3]
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/array-filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ core-js(-pure)/full/array(/prototype)/filter-reject
core-js/full/typed-array/filter-reject
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-filtering`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-filtering.d.ts)

## Examples
```js
[1, 2, 3, 4, 5].filterReject(it => it % 2); // => [2, 4]
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/array-find-from-last.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ class %TypedArray% {
```plaintext
core-js/proposals/array-find-from-last
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-find-from-last`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-find-from-last.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/array-fromasync.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ class Array {
```plaintext
core-js/proposals/array-from-async
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-from-async`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-from-async.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/array-grouping.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ class Map {
```plaintext
core-js/proposals/array-grouping-v2
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-grouping`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-grouping.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/array-istemplateobject.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ core-js/proposals/array-is-template-object
core-js(-pure)/full/array/is-template-object
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-is-template-object`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-is-template-object.d.ts)

## Example
```js
console.log(Array.isTemplateObject((it => it)`qwe${ 123 }asd`)); // => true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ class Array {
```plaintext
core-js/proposals/array-flat-map
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-flat-map`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-flat-map.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/array-prototype-includes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ class %TypedArray% {
```plaintext
core-js/proposals/array-includes
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-includes`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-includes.d.ts)
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ class ArrayBuffer {
```plaintext
core-js/proposals/array-buffer-transfer
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/array-buffer-transfer`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/array-buffer-transfer.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/asynciterator-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ core-js(-pure)/actual|full/async-iterator/to-array
core-js(-pure)/actual|full/iterator/to-async
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/async-iterator-helpers`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/async-iterator-helpers.d.ts)

## Examples
```js
await AsyncIterator.from([1, 2, 3, 4, 5, 6, 7])
Expand Down
5 changes: 4 additions & 1 deletion docs/web/docs/features/proposals/await-dictionary.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ class Promise {
```

## [Entry points]({docs-version}/docs/usage#h-entry-points)
```ts
```plaintext
core-js/proposals/promise-all-keyed
core-js(-pure)/full/promise/all-keyed
core-js(-pure)/full/promise/all-settled-keyed
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/await-dictionary`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/await-dictionary.d.ts)

## Examples
```js
await Promise.allKeyed({
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/change-array-by-copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ core-js/es|stable|actual|full/typed-array/to-reversed
core-js/es|stable|actual|full/typed-array/to-sorted
core-js/es|stable|actual|full/typed-array/with
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/change-array-by-copy`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/change-array-by-copy.d.ts)
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ core-js/full/dataview/get-uint8-clamped
core-js/full/dataview/set-uint8-clamped
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/data-view-get-set-uint8-clamped`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/data-view-get-set-uint8-clamped.d.ts)

## Examples
```js
const view = new DataView(new ArrayBuffer(1));
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/error-iserror.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ class Error {
core-js/proposals/is-error
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/is-error`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/is-error.d.ts)

> [!WARNING]
> We have no bulletproof way to polyfill this `Error.isError` / check if the object is an error, so it's an enough naive implementation.
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ class AsyncIterator {
```plaintext
core-js/proposals/explicit-resource-management
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/explicit-resource-management`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/explicit-resource-management.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/float16-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ namespace Math {
```plaintext
core-js/proposals/float16
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/float16`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/float16.d.ts)
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ core-js(-pure)/full/function/demethodize
core-js(-pure)/full/function/prototype/demethodize
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/function-demethodize`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/function-demethodize.d.ts)

## Examples
```js
const slice = Array.prototype.slice.demethodize();
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/iterator-chunking.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ core-js(-pure)/full/iterator/chunks
core-js(-pure)/full/iterator/windows
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/iterator-chunking`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/iterator-chunking.d.ts)

## Examples
```js
const digits = () => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].values();
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/iterator-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ class Iterator {
```plaintext
core-js/proposals/iterator-helpers
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/iterator-helpers`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/iterator-helpers.d.ts)
5 changes: 4 additions & 1 deletion docs/web/docs/features/proposals/iterator-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ class Iterator {
```

## [Entry points]({docs-version}/docs/usage#h-entry-points)
```ts
```plaintext
core-js/proposals/iterator-join
core-js(-pure)/full/iterator/join
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/iterator-join`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/iterator-join.d.ts)

## Examples
```js
const digits = () => [1, 2, 3].values();
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/iterator-range.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ core-js/proposals/number-range
core-js(-pure)/full/iterator/range
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/iterator-range`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/iterator-range.d.ts)

## Example
```js
for (const i of Iterator.range(1, 10)) {
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/iterator-sequencing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ core-js/proposals/iterator-sequencing
core-js(-pure)/es|stable|actual|full/iterator/concat
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/iterator-sequencing`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/iterator-sequencing.d.ts)

## Example
```js
Iterator.concat([0, 1].values(), [2, 3], function * () {
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/joint-iteration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ core-js(-pure)/actual|full/iterator/zip
core-js(-pure)/actual|full/iterator/zip-keyed
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/iterator-joint`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/iterator-joint.d.ts)

## Example
```js
Iterator.zip([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ core-js(-pure)/es|stable|actual|full/json/raw-json
core-js(-pure)/es|stable|actual|full/json/stringify
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/json-parse-with-source`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/json-parse-with-source.d.ts)

## Examples
```js
function digitsToBigInt(key, val, { source }) {
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/map-upsert.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ core-js(-pure)/es|stable|actual|full/weak-map/get-or-insert
core-js(-pure)/es|stable|actual|full/weak-map/get-or-insert-computed
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/map-upsert`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/map-upsert.d.ts)

## Examples
```js
const map = new Map([['a', 1]]);
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/math-sumprecise.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ namespace Math {
```plaintext
core-js/proposals/math-sum
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/math-sum`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/math-sum.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/number-prototype-clamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ core-js/proposals/math-clamp-v2
core-js(-pure)/full/number/clamp
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/number-clamp`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/number-clamp.d.ts)

## Example
```js
5.0.clamp(0, 10); // => 5
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/object-fromentries.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ class Object {
```plaintext
core-js/proposals/object-from-entries
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/object-from-entries`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/object-from-entries.d.ts)
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ class Object {
```plaintext
core-js/proposals/object-getownpropertydescriptors
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/object-get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/object-get-own-property-descriptors.d.ts)

3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/object-values-entries.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ class Object {
```plaintext
core-js/proposals/object-values-entries
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/object-values-entries`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/object-values-entries.d.ts)
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ core-js(-pure)/full/weak-map/from
core-js(-pure)/full/weak-map/of
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/collection-of-from`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/collection-of-from.d.ts)


## Examples
```js
Set.of(1, 2, 3, 2, 1); // => Set {1, 2, 3}
Expand Down
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/promise-allsettled.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ class Promise {
```plaintext
core-js/proposals/promise-all-settled
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/promise-all-settled`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/promise-all-settled.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/promise-any.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ class Promise {
```plaintext
core-js/proposals/promise-any
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/promise-any`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/promise-any.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/promise-prototype-finally.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ class Promise {
```plaintext
core-js/proposals/promise-finally
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/promise-finally`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/promise-finally.d.ts)
3 changes: 3 additions & 0 deletions docs/web/docs/features/proposals/promise-try.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ class Promise {
```plaintext
core-js/proposals/promise-try
```

## [TypeScript type definitions]({docs-version}/docs/typescript-type-definitions)
[`@core-js/types/proposals/promise-try`](https://github.com/zloirock/core-js/blob/v4-types/packages/core-js-types/src/base/proposals/promise-try.d.ts)
Loading