Skip to content

Have Set and Map constructors take ReadonlyArrays #20606

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

Merged
1 commit merged into from
Jan 8, 2018
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
8 changes: 4 additions & 4 deletions src/lib/es2015.collection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface Map<K, V> {

interface MapConstructor {
new (): Map<any, any>;
new <K, V>(entries?: [K, V][]): Map<K, V>;
new <K, V>(entries?: ReadonlyArray<[K, V]>): Map<K, V>;
readonly prototype: Map<any, any>;
}
declare var Map: MapConstructor;
Expand All @@ -31,7 +31,7 @@ interface WeakMap<K extends object, V> {

interface WeakMapConstructor {
new (): WeakMap<object, any>;
new <K extends object, V>(entries?: [K, V][]): WeakMap<K, V>;
new <K extends object, V>(entries?: ReadonlyArray<[K, V]>): WeakMap<K, V>;
readonly prototype: WeakMap<object, any>;
}
declare var WeakMap: WeakMapConstructor;
Expand All @@ -47,7 +47,7 @@ interface Set<T> {

interface SetConstructor {
new (): Set<any>;
new <T>(values?: T[]): Set<T>;
new <T>(values?: ReadonlyArray<T>): Set<T>;
readonly prototype: Set<any>;
}
declare var Set: SetConstructor;
Expand All @@ -66,7 +66,7 @@ interface WeakSet<T> {

interface WeakSetConstructor {
new (): WeakSet<object>;
new <T extends object>(values?: T[]): WeakSet<T>;
new <T extends object>(values?: ReadonlyArray<T>): WeakSet<T>;
readonly prototype: WeakSet<object>;
}
declare var WeakSet: WeakSetConstructor;