Un-consolidate overloads for Map and WeakMap (#28052)

This commit is contained in:
Andy
2018-10-22 11:18:56 -07:00
committed by GitHub
parent 8e0142d709
commit afa94c527c
7 changed files with 28 additions and 2 deletions

View File

@@ -9,7 +9,8 @@ interface Map<K, V> {
}
interface MapConstructor {
new <K = any, V = any>(entries?: ReadonlyArray<[K, V]> | null): Map<K, V>;
new(): Map<any, any>;
new<K, V>(entries?: ReadonlyArray<[K, V]> | null): Map<K, V>;
readonly prototype: Map<any, any>;
}
declare var Map: MapConstructor;

View File

@@ -135,7 +135,7 @@ interface MapConstructor {
interface WeakMap<K extends object, V> { }
interface WeakMapConstructor {
new <K extends object = object, V = any>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
}
interface Set<T> {