mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Unify our Map/Set typings with the ones in es6-shim (angular)
This commit is contained in:
6
es-collections.d.ts
vendored
6
es-collections.d.ts
vendored
@ -13,6 +13,8 @@ interface Map<K, V> {
|
||||
has(key: K): boolean;
|
||||
set(key: K, value: V): Map<K, V>;
|
||||
size: number;
|
||||
keys(): Array<K>;
|
||||
values(): Array<V>;
|
||||
}
|
||||
declare var Map: {
|
||||
new <K, V>(): Map<K, V>;
|
||||
@ -24,6 +26,10 @@ declare var Map: {
|
||||
prototype: Map<any, any>;
|
||||
}
|
||||
|
||||
//For compatibility - some libs insist on the Map/Set types being named that way
|
||||
declare type MapConstructor = typeof Map;
|
||||
declare type SetConstructor = typeof Set;
|
||||
|
||||
interface Set<T> {
|
||||
add(value: T): Set<T>;
|
||||
clear(): void;
|
||||
|
Reference in New Issue
Block a user