Skip to content

Commit 661b11c

Browse files
committed
Make it easier to polyfill built-in extensions
This PR adds separate interfaces for constructors, similarly to how lib.es*.d.ts define ECMAScript built-ins. This ensures that downstream typings can extend built-in constructor with static methods when polyfilling new and/or unstable features. This was not possible with inline type declarations, because TypeScript does not allow variable declaration merging, but it is possible with a separate interface because you can declare them with the same name downstream, and it will get merged into the base type.
1 parent 4d745be commit 661b11c

File tree

3 files changed

+1481
-740
lines changed

3 files changed

+1481
-740
lines changed

0 commit comments

Comments
 (0)