diff --git a/src/lib/es2015.array.d.ts b/src/lib/es2015.array.d.ts index 08e931433e7..1643f928637 100644 --- a/src/lib/es2015.array.d.ts +++ b/src/lib/es2015.array.d.ts @@ -1,37 +1,4 @@ - interface Array { - /** Iterator */ - [Symbol.iterator](): IterableIterator; - - /** - * Returns an object whose properties have the value 'true' - * when they will be absent when used in a 'with' statement. - */ - [Symbol.unscopables](): { - copyWithin: boolean; - entries: boolean; - fill: boolean; - find: boolean; - findIndex: boolean; - keys: boolean; - values: boolean; - }; - - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): IterableIterator<[number, T]>; - - /** - * Returns an list of keys in the array - */ - keys(): IterableIterator; - - /** - * Returns an list of values in the array - */ - values(): IterableIterator; - /** * Returns the value of the first element in the array where predicate is true, and undefined * otherwise. @@ -85,13 +52,6 @@ interface ArrayConstructor { */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array; /** * Creates an array from an array-like object. @@ -99,12 +59,6 @@ interface ArrayConstructor { */ from(arrayLike: ArrayLike): Array; - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - from(iterable: Iterable): Array; - /** * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. diff --git a/src/lib/es2015.collection.d.ts b/src/lib/es2015.collection.d.ts index aabe99cc51f..81613800d50 100644 --- a/src/lib/es2015.collection.d.ts +++ b/src/lib/es2015.collection.d.ts @@ -31,3 +31,40 @@ interface WeakMapConstructor { } declare var WeakMap: WeakMapConstructor; +interface Set { + add(value: T): Set; + clear(): void; + delete(value: T): boolean; + entries(): IterableIterator<[T, T]>; + forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; + has(value: T): boolean; + keys(): IterableIterator; + readonly size: number; + values(): IterableIterator; + [Symbol.iterator]():IterableIterator; + readonly [Symbol.toStringTag]: "Set"; +} + +interface SetConstructor { + new (): Set; + new (): Set; + new (iterable: Iterable): Set; + readonly prototype: Set; +} +declare var Set: SetConstructor; + +interface WeakSet { + add(value: T): WeakSet; + clear(): void; + delete(value: T): boolean; + has(value: T): boolean; + readonly [Symbol.toStringTag]: "WeakSet"; +} + +interface WeakSetConstructor { + new (): WeakSet; + new (): WeakSet; + new (iterable: Iterable): WeakSet; + readonly prototype: WeakSet; +} +declare var WeakSet: WeakSetConstructor; diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 0dd2a5d1091..1d152f3ad56 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -4106,4 +4106,4 @@ interface Date { * @param options An object that contains one or more properties that specify comparison options. */ toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string; -} \ No newline at end of file +}