From 2682703ccafc2ff4ea1807c511d519ea1b5092d9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 18 Aug 2015 12:55:54 -0700 Subject: [PATCH] Added the '[Symbol.hasInstance]' method to the 'Function' interface. --- src/lib/es6.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index d7d9bbce1b4..934aa9d0762 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -174,6 +174,15 @@ interface Function { * Returns the name of the function. Function names are read-only and can not be changed. */ name: string; + + /** + * Determines whether the given value inherits from this function if this function was used + * as a constructor function. + * + * A constructor function can control which objects are recognized as its instances by + * 'instanceof' by overriding this method. + */ + [Symbol.hasInstance](value: any): boolean; } interface NumberConstructor {