Interface CallableFunction
arguments: any;
caller: Function;
length: number;
name: string;
prototype: any;
[hasInstance](value: any): boolean;
apply<T, R>(this: ((this: T) => R), thisArg: T): R;
apply<T, A, R>(this: ((this: T, ...args: A) => R), thisArg: T, args: A): R;
bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
bind<T, A, B, R>(this: ((this: T, ...args: [...A[], ...B[]]) => R), thisArg: T, ...args: A): ((...args: B) => R);
call<T, A, R>(this: ((this: T, ...args: A) => R), thisArg: T, ...args: A): R;
toString(): string;
}
Properties
arguments
caller
Readonly
length
Readonly
name
prototype
Methods
[hasInstance]
- [has
Instance] (value): boolean 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.
Parameters
- value: any
Returns boolean
apply
- apply<T, R>(this, thisArg): R
Calls the function with the specified object as the this value and the elements of specified array as the arguments.
Type Parameters
Parameters
Returns R
- apply<T, A, R>(this, thisArg, args): R
Calls the function with the specified object as the this value and the elements of specified array as the arguments.
Type Parameters
Parameters
Returns R
bind
- bind<T>(this, thisArg): OmitThisParameter<T>
For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.
Type Parameters
Parameters
- this: T
- thisArg: ThisParameterType<T>
The object to be used as the this object.
Returns OmitThisParameter<T>
- bind<T, A, B, R>(this, thisArg, ...args): ((...args: B) => R)
For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.
Type Parameters
Parameters
Returns ((...args: B) => R)
Returns the name of the function. Function names are read-only and can not be changed.