mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 14:34:35 -06:00
Added the '[Symbol.hasInstance]' method to the 'Function' interface.
This commit is contained in:
parent
448f2d607d
commit
2682703cca
9
src/lib/es6.d.ts
vendored
9
src/lib/es6.d.ts
vendored
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user