Skip to content

Commit 2682703

Browse files
Added the '[Symbol.hasInstance]' method to the 'Function' interface.
1 parent 448f2d6 commit 2682703

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/lib/es6.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@ interface Function {
174174
* Returns the name of the function. Function names are read-only and can not be changed.
175175
*/
176176
name: string;
177+
178+
/**
179+
* Determines whether the given value inherits from this function if this function was used
180+
* as a constructor function.
181+
*
182+
* A constructor function can control which objects are recognized as its instances by
183+
* 'instanceof' by overriding this method.
184+
*/
185+
[Symbol.hasInstance](value: any): boolean;
177186
}
178187

179188
interface NumberConstructor {

0 commit comments

Comments
 (0)