1interface Map<K, V> { 2 clear(): void; 3 delete(key: K): boolean; 4 forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void; 5 get(key: K): V | undefined; 6 has(key: K): boolean; 7 set(key: K, value: V): this; 8 readonly size: number; 9} 10 11interface MapConstructor { 12 new(): Map<any, any>; 13 new<K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>; 14 readonly prototype: Map<any, any>; 15} 16declare var Map: MapConstructor; 17 18interface ReadonlyMap<K, V> { 19 forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void; 20 get(key: K): V | undefined; 21 has(key: K): boolean; 22 readonly size: number; 23} 24 25interface WeakMap<K extends object, V> { 26 delete(key: K): boolean; 27 get(key: K): V | undefined; 28 has(key: K): boolean; 29 set(key: K, value: V): this; 30} 31 32interface WeakMapConstructor { 33 new <K extends object = object, V = any>(entries?: readonly [K, V][] | null): WeakMap<K, V>; 34 readonly prototype: WeakMap<object, any>; 35} 36declare var WeakMap: WeakMapConstructor; 37 38interface Set<T> { 39 add(value: T): this; 40 clear(): void; 41 delete(value: T): boolean; 42 forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void; 43 has(value: T): boolean; 44 readonly size: number; 45} 46 47interface SetConstructor { 48 new <T = any>(values?: readonly T[] | null): Set<T>; 49 readonly prototype: Set<any>; 50} 51declare var Set: SetConstructor; 52 53interface ReadonlySet<T> { 54 forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void; 55 has(value: T): boolean; 56 readonly size: number; 57} 58 59interface WeakSet<T extends object> { 60 add(value: T): this; 61 delete(value: T): boolean; 62 has(value: T): boolean; 63} 64 65interface WeakSetConstructor { 66 new <T extends object = object>(values?: readonly T[] | null): WeakSet<T>; 67 readonly prototype: WeakSet<object>; 68} 69declare var WeakSet: WeakSetConstructor; 70