|
| 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): this; |
| 24 | + readonly size: number; |
| 25 | +} |
| 26 | + |
| 27 | +interface MapConstructor { |
| 28 | + new (): Map<any, any>; |
| 29 | + new <K, V>(entries?: [K, V][]): Map<K, V>; |
| 30 | + readonly prototype: Map<any, any>; |
| 31 | +} |
| 32 | +declare var Map: MapConstructor; |
| 33 | + |
| 34 | +interface WeakMap<K, V> { |
| 35 | + delete(key: K): boolean; |
| 36 | + get(key: K): V | undefined; |
| 37 | + has(key: K): boolean; |
| 38 | + set(key: K, value?: V): this; |
| 39 | +} |
| 40 | + |
| 41 | +interface WeakMapConstructor { |
| 42 | + new (): WeakMap<any, any>; |
| 43 | + new <K, V>(entries?: [K, V][]): WeakMap<K, V>; |
| 44 | + readonly prototype: WeakMap<any, any>; |
| 45 | +} |
| 46 | +declare var WeakMap: WeakMapConstructor; |
| 47 | + |
| 48 | +interface Set<T> { |
| 49 | + add(value: T): this; |
| 50 | + clear(): void; |
| 51 | + delete(value: T): boolean; |
| 52 | + forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void; |
| 53 | + has(value: T): boolean; |
| 54 | + readonly size: number; |
| 55 | +} |
| 56 | + |
| 57 | +interface SetConstructor { |
| 58 | + new (): Set<any>; |
| 59 | + new <T>(values?: T[]): Set<T>; |
| 60 | + readonly prototype: Set<any>; |
| 61 | +} |
| 62 | +declare var Set: SetConstructor; |
| 63 | + |
| 64 | +interface WeakSet<T> { |
| 65 | + add(value: T): this; |
| 66 | + delete(value: T): boolean; |
| 67 | + has(value: T): boolean; |
| 68 | +} |
| 69 | + |
| 70 | +interface WeakSetConstructor { |
| 71 | + new (): WeakSet<any>; |
| 72 | + new <T>(values?: T[]): WeakSet<T>; |
| 73 | + readonly prototype: WeakSet<any>; |
| 74 | +} |
| 75 | +declare var WeakSet: WeakSetConstructor; |
0 commit comments