From e2ee3c5c152c1f1facba341f551c1550a7cdab71 Mon Sep 17 00:00:00 2001 From: Gabe Moothart Date: Thu, 15 Sep 2016 10:33:06 -0700 Subject: [PATCH] Removed constructor typings which can't be used Also corrected some parameter names. --- src/lib/es2015.collection.d.ts | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/lib/es2015.collection.d.ts b/src/lib/es2015.collection.d.ts index 9b0a484ce36..4cdb2d187a5 100644 --- a/src/lib/es2015.collection.d.ts +++ b/src/lib/es2015.collection.d.ts @@ -1,7 +1,7 @@ interface Map { clear(): void; delete(key: K): boolean; - forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; get(key: K): V | undefined; has(key: K): boolean; set(key: K, value?: V): this; @@ -17,19 +17,13 @@ declare var Map: MapConstructor; interface ReadonlyMap { forEach( - callbackfn: (value: V, index: K, map: ReadonlyMap) => void, + callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; get(key: K): V|undefined; has(key: K): boolean; readonly size: number; } -interface ReadonlyMapConstructor { - new(entries?: [K, V][]): ReadonlyMap; - readonly prototype: ReadonlyMap; -} -declare var ReadonlyMap: ReadonlyMapConstructor; - interface WeakMap { delete(key: K): boolean; get(key: K): V | undefined; @@ -48,7 +42,7 @@ interface Set { add(value: T): this; clear(): void; delete(value: T): boolean; - forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void; has(value: T): boolean; readonly size: number; } @@ -61,18 +55,12 @@ interface SetConstructor { declare var Set: SetConstructor; interface ReadonlySet { - forEach(callbackfn: (value: T, index: T, set: ReadonlySet) => void, thisArg?: any): + forEach(callbackfn: (value: T, value2: T, set: ReadonlySet) => void, thisArg?: any): void; has(value: T): boolean; readonly size: number; } -interface ReadonlySetConstructor { - new(values?: T[]): ReadonlySet; - readonly prototype: ReadonlySet; -} -declare var ReadonlySet: ReadonlySetConstructor; - interface WeakSet { add(value: T): this; delete(value: T): boolean;