|
7 | 7 | // CHECK WITH http://kangax.github.io/compat-table/es6/#ie11 |
8 | 8 |
|
9 | 9 | interface Map<K, V> { |
10 | | - clear(): void; |
11 | | - delete(key: K): boolean; |
12 | | - forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void; |
13 | | - get(key: K): V; |
14 | | - has(key: K): boolean; |
15 | | - set(key: K, value?: V): Map<K, V>; |
16 | | - readonly size: number; |
17 | | - |
18 | | - // not supported on IE11: |
19 | | - // entries(): IterableIterator<[K, V]>; |
20 | | - // keys(): IterableIterator<K>; |
21 | | - // values(): IterableIterator<V>; |
22 | | - // [Symbol.iterator]():IterableIterator<[K,V]>; |
23 | | - // [Symbol.toStringTag]: string; |
| 10 | + clear(): void; |
| 11 | + delete(key: K): boolean; |
| 12 | + forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void; |
| 13 | + get(key: K): V; |
| 14 | + has(key: K): boolean; |
| 15 | + set(key: K, value?: V): Map<K, V>; |
| 16 | + readonly size: number; |
| 17 | + |
| 18 | + // not supported on IE11: |
| 19 | + // entries(): IterableIterator<[K, V]>; |
| 20 | + // keys(): IterableIterator<K>; |
| 21 | + // values(): IterableIterator<V>; |
| 22 | + // [Symbol.iterator]():IterableIterator<[K,V]>; |
| 23 | + // [Symbol.toStringTag]: string; |
24 | 24 | } |
25 | 25 |
|
26 | 26 | interface MapConstructor { |
27 | | - new <K, V>(): Map<K, V>; |
28 | | - prototype: Map<any, any>; |
| 27 | + new <K, V>(): Map<K, V>; |
| 28 | + prototype: Map<any, any>; |
29 | 29 |
|
30 | | - // not supported on IE11: |
31 | | - // new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>; |
| 30 | + // not supported on IE11: |
| 31 | + // new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>; |
32 | 32 | } |
33 | 33 | declare var Map: MapConstructor; |
34 | 34 |
|
35 | 35 |
|
36 | 36 | interface Set<T> { |
37 | | - add(value: T): Set<T>; |
38 | | - clear(): void; |
39 | | - delete(value: T): boolean; |
40 | | - forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void; |
41 | | - has(value: T): boolean; |
42 | | - readonly size: number; |
43 | | - |
44 | | - // not supported on IE11: |
45 | | - // entries(): IterableIterator<[T, T]>; |
46 | | - // keys(): IterableIterator<T>; |
47 | | - // values(): IterableIterator<T>; |
48 | | - // [Symbol.iterator]():IterableIterator<T>; |
49 | | - // [Symbol.toStringTag]: string; |
| 37 | + add(value: T): Set<T>; |
| 38 | + clear(): void; |
| 39 | + delete(value: T): boolean; |
| 40 | + forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void; |
| 41 | + has(value: T): boolean; |
| 42 | + readonly size: number; |
| 43 | + |
| 44 | + // not supported on IE11: |
| 45 | + // entries(): IterableIterator<[T, T]>; |
| 46 | + // keys(): IterableIterator<T>; |
| 47 | + // values(): IterableIterator<T>; |
| 48 | + // [Symbol.iterator]():IterableIterator<T>; |
| 49 | + // [Symbol.toStringTag]: string; |
50 | 50 | } |
51 | 51 |
|
52 | 52 | interface SetConstructor { |
53 | | - new <T>(): Set<T>; |
54 | | - prototype: Set<any>; |
| 53 | + new <T>(): Set<T>; |
| 54 | + prototype: Set<any>; |
55 | 55 |
|
56 | | - // not supported on IE11: |
57 | | - // new <T>(iterable: Iterable<T>): Set<T>; |
| 56 | + // not supported on IE11: |
| 57 | + // new <T>(iterable: Iterable<T>): Set<T>; |
58 | 58 | } |
59 | 59 | declare var Set: SetConstructor; |
60 | 60 |
|
61 | 61 |
|
62 | 62 | interface WeakMap<K, V> { |
63 | | - delete(key: K): boolean; |
64 | | - get(key: K): V | undefined; |
65 | | - has(key: K): boolean; |
66 | | - // IE11 doesn't return this |
67 | | - // set(key: K, value?: V): this; |
68 | | - set(key: K, value?: V): undefined; |
| 63 | + delete(key: K): boolean; |
| 64 | + get(key: K): V | undefined; |
| 65 | + has(key: K): boolean; |
| 66 | + // IE11 doesn't return this |
| 67 | + // set(key: K, value?: V): this; |
| 68 | + set(key: K, value?: V): undefined; |
69 | 69 | } |
70 | 70 |
|
71 | 71 | interface WeakMapConstructor { |
72 | | - new (): WeakMap<any, any>; |
73 | | - new <K, V>(): WeakMap<K, V>; |
74 | | - // new <K, V>(entries?: [K, V][]): WeakMap<K, V>; |
75 | | - readonly prototype: WeakMap<any, any>; |
| 72 | + new(): WeakMap<any, any>; |
| 73 | + new <K, V>(): WeakMap<K, V>; |
| 74 | + // new <K, V>(entries?: [K, V][]): WeakMap<K, V>; |
| 75 | + readonly prototype: WeakMap<any, any>; |
76 | 76 | } |
77 | 77 | declare var WeakMap: WeakMapConstructor; |
78 | 78 |
|
|
0 commit comments