From c2b4a8bf0f53fe7056cb108d64526915bf6e741b Mon Sep 17 00:00:00 2001 From: Hristo Deshev Date: Thu, 18 Feb 2016 12:05:14 +0200 Subject: [PATCH] Unify our Map/Set typings with the ones in es6-shim (angular) --- es-collections.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/es-collections.d.ts b/es-collections.d.ts index ee8196f66..c55bfd143 100644 --- a/es-collections.d.ts +++ b/es-collections.d.ts @@ -13,6 +13,8 @@ interface Map { has(key: K): boolean; set(key: K, value: V): Map; size: number; + keys(): Array; + values(): Array; } declare var Map: { new (): Map; @@ -24,6 +26,10 @@ declare var Map: { prototype: Map; } +//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 { add(value: T): Set; clear(): void;