Added the '[Symbol.unscopables]' method to the 'Array<T>' interface.

This commit is contained in:
Daniel Rosenwasser
2015-08-18 15:22:13 -07:00
parent 66b17c1c73
commit 006fc951e3

18
src/lib/es6.d.ts vendored
View File

@@ -98,8 +98,8 @@ interface SymbolConstructor {
*/
toStringTag: symbol;
/**
* An Object whose own property names are property names that are excluded from the with
/**
* An Object whose own property names are property names that are excluded from the 'with'
* environment bindings of the associated objects.
*/
unscopables: symbol;
@@ -260,6 +260,20 @@ interface Array<T> {
/** Iterator */
[Symbol.iterator](): IterableIterator<T>;
/**
* 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
*/