mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 01:33:15 -05:00
Un-consolidate overloads for Map and WeakMap (#28052)
This commit is contained in:
3
src/lib/es2015.collection.d.ts
vendored
3
src/lib/es2015.collection.d.ts
vendored
@@ -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;
|
||||
|
||||
2
src/lib/es2015.iterable.d.ts
vendored
2
src/lib/es2015.iterable.d.ts
vendored
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user