Skip to content

Commit

Permalink
Add Symbol.species to ArrayConstructor, MapConstructor, SetConstructo…
Browse files Browse the repository at this point in the history
…r, ArrayBufferConstructor.

Fix Symbol.species in RegExpConstructor and PromiseConstructor.

See #2881 .
  • Loading branch information
NaridaL committed Sep 21, 2017
1 parent d9951cb commit 33344f9
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/lib/es2015.symbol.wellknown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ interface Promise<T> {
}

interface PromiseConstructor {
readonly [Symbol.species]: Function;
readonly [Symbol.species]: PromiseConstructor;
}

interface RegExp {
Expand Down Expand Up @@ -202,7 +202,7 @@ interface RegExp {
}

interface RegExpConstructor {
[Symbol.species](): RegExpConstructor;
readonly [Symbol.species]: RegExpConstructor;
}

interface String {
Expand Down Expand Up @@ -283,3 +283,16 @@ interface Float32Array {
interface Float64Array {
readonly [Symbol.toStringTag]: "Float64Array";
}

interface ArrayConstructor {
readonly [Symbol.species]: ArrayConstructor;
}
interface MapConstructor {
readonly [Symbol.species]: MapConstructor;
}
interface SetConstructor {
readonly [Symbol.species]: SetConstructor;
}
interface ArrayBufferConstructor {
readonly [Symbol.species]: ArrayBufferConstructor;
}

0 comments on commit 33344f9

Please sign in to comment.