Add a non-generic construct signature to Map, Set, and WeakMap

This commit is contained in:
Mohamed Hegazy 2015-06-17 21:28:49 -07:00
parent 247d5820dd
commit 76ec1f0fec

4
src/lib/es6.d.ts vendored
View file

@ -694,6 +694,7 @@ interface Map<K, V> {
}
interface MapConstructor {
new (): Map<any, any>;
new <K, V>(): Map<K, V>;
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
prototype: Map<any, any>;
@ -710,6 +711,7 @@ interface WeakMap<K, V> {
}
interface WeakMapConstructor {
new (): WeakMap<any, any>;
new <K, V>(): WeakMap<K, V>;
new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
prototype: WeakMap<any, any>;
@ -731,6 +733,7 @@ interface Set<T> {
}
interface SetConstructor {
new (): Set<any>;
new <T>(): Set<T>;
new <T>(iterable: Iterable<T>): Set<T>;
prototype: Set<any>;
@ -746,6 +749,7 @@ interface WeakSet<T> {
}
interface WeakSetConstructor {
new (): WeakSet<any>;
new <T>(): WeakSet<T>;
new <T>(iterable: Iterable<T>): WeakSet<T>;
prototype: WeakSet<any>;