Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Symbol.species to ArrayConstructor, MapConstructor, SetConstructo… #18652

Merged
merged 1 commit into from
Nov 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the spec, the property type should be this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielRosenwasser, do you know if using a this type here would be problematic for someone writing a subclass?

}

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

interface RegExpConstructor {
[Symbol.species](): RegExpConstructor;
readonly [Symbol.species]: RegExpConstructor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the spec, the property type should be this.

}

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

interface ArrayConstructor {
readonly [Symbol.species]: ArrayConstructor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the spec, the property type should be this.

}
interface MapConstructor {
readonly [Symbol.species]: MapConstructor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the spec, the property type should be this.

}
interface SetConstructor {
readonly [Symbol.species]: SetConstructor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the spec, the property type should be this.

}
interface ArrayBufferConstructor {
readonly [Symbol.species]: ArrayBufferConstructor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the spec, the property type should be this.

}