diff --git a/src/lib/es2015.collection.d.ts b/src/lib/es2015.collection.d.ts index 521dd29be9f..a3207175c48 100644 --- a/src/lib/es2015.collection.d.ts +++ b/src/lib/es2015.collection.d.ts @@ -4,7 +4,7 @@ interface Map { forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; get(key: K): V | undefined; has(key: K): boolean; - set(key: K, value?: V): Map; + set(key: K, value?: V): this; readonly size: number; } @@ -20,8 +20,7 @@ interface WeakMap { delete(key: K): boolean; get(key: K): V | undefined; has(key: K): boolean; - set(key: K, value?: V): WeakMap; - + set(key: K, value?: V): this; } interface WeakMapConstructor { @@ -32,7 +31,7 @@ interface WeakMapConstructor { declare var WeakMap: WeakMapConstructor; interface Set { - add(value: T): Set; + add(value: T): this; clear(): void; delete(value: T): boolean; forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; @@ -48,11 +47,10 @@ interface SetConstructor { declare var Set: SetConstructor; interface WeakSet { - add(value: T): WeakSet; + add(value: T): this; clear(): void; delete(value: T): boolean; has(value: T): boolean; - } interface WeakSetConstructor {