From 006fc951e3c3ed82459d83e7e9fb85caa1e2d5bc Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 18 Aug 2015 15:22:13 -0700 Subject: [PATCH] Added the '[Symbol.unscopables]' method to the 'Array' interface. --- src/lib/es6.d.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index 7e60f6f9c23..a86c75fa23f 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -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 { /** 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 */