|
| 1 | +/*! ***************************************************************************** |
| 2 | +Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | +Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
| 4 | +this file except in compliance with the License. You may obtain a copy of the |
| 5 | +License at http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | + |
| 7 | +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 8 | +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
| 9 | +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
| 10 | +MERCHANTABLITY OR NON-INFRINGEMENT. |
| 11 | + |
| 12 | +See the Apache Version 2.0 License for specific language governing permissions |
| 13 | +and limitations under the License. |
| 14 | +***************************************************************************** */ |
| 15 | + |
| 16 | +/// <reference no-default-lib="true"/> |
| 17 | +interface Map<K, V> { |
| 18 | + clear(): void; |
| 19 | + delete(key: K): boolean; |
| 20 | + forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void; |
| 21 | + get(key: K): V | undefined; |
| 22 | + has(key: K): boolean; |
| 23 | + set(key: K, value?: V): Map<K, V>; |
| 24 | + readonly size: number; |
| 25 | +} |
| 26 | + |
| 27 | +interface MapConstructor { |
| 28 | + new (): Map<any, any>; |
| 29 | + new <K, V>(): Map<K, V>; |
| 30 | + readonly prototype: Map<any, any>; |
| 31 | +} |
| 32 | +declare var Map: MapConstructor; |
| 33 | + |
| 34 | +interface WeakMap<K, V> { |
| 35 | + clear(): void; |
| 36 | + delete(key: K): boolean; |
| 37 | + get(key: K): V | undefined; |
| 38 | + has(key: K): boolean; |
| 39 | + set(key: K, value?: V): WeakMap<K, V>; |
| 40 | + |
| 41 | +} |
| 42 | + |
| 43 | +interface WeakMapConstructor { |
| 44 | + new (): WeakMap<any, any>; |
| 45 | + new <K, V>(): WeakMap<K, V>; |
| 46 | + readonly prototype: WeakMap<any, any>; |
| 47 | +} |
| 48 | +declare var WeakMap: WeakMapConstructor; |
| 49 | + |
| 50 | +interface Set<T> { |
| 51 | + add(value: T): Set<T>; |
| 52 | + clear(): void; |
| 53 | + delete(value: T): boolean; |
| 54 | + entries(): IterableIterator<[T, T]>; |
| 55 | + forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void; |
| 56 | + has(value: T): boolean; |
| 57 | + keys(): IterableIterator<T>; |
| 58 | + readonly size: number; |
| 59 | + values(): IterableIterator<T>; |
| 60 | + [Symbol.iterator]():IterableIterator<T>; |
| 61 | + readonly [Symbol.toStringTag]: "Set"; |
| 62 | +} |
| 63 | + |
| 64 | +interface SetConstructor { |
| 65 | + new (): Set<any>; |
| 66 | + new <T>(): Set<T>; |
| 67 | + new <T>(iterable: Iterable<T>): Set<T>; |
| 68 | + readonly prototype: Set<any>; |
| 69 | +} |
| 70 | +declare var Set: SetConstructor; |
| 71 | + |
| 72 | +interface WeakSet<T> { |
| 73 | + add(value: T): WeakSet<T>; |
| 74 | + clear(): void; |
| 75 | + delete(value: T): boolean; |
| 76 | + has(value: T): boolean; |
| 77 | + readonly [Symbol.toStringTag]: "WeakSet"; |
| 78 | +} |
| 79 | + |
| 80 | +interface WeakSetConstructor { |
| 81 | + new (): WeakSet<any>; |
| 82 | + new <T>(): WeakSet<T>; |
| 83 | + new <T>(iterable: Iterable<T>): WeakSet<T>; |
| 84 | + readonly prototype: WeakSet<any>; |
| 85 | +} |
| 86 | +declare var WeakSet: WeakSetConstructor; |
0 commit comments