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