isInstance()
Last updated
Was this helpful?
Last updated
Was this helpful?
isInstance()
Checks if value is an instance of a given .
Obj
Payload
extends
object
value: any
constructor: Constructor<Obj>
callback: ResultCallback<any, { ctor: typeof constructor } & Payload>
payload?: Payload
value is Obj
callback
and payload
A generic type variable Obj
, by default captured from the provided , indicates the type of generic type , and the type of parameter via the value is Obj
.
The Payload
generic type variable constrained by indicates the type of optional parameter of the supplied function and optional parameter of the function from which it captures its value.
The value of type to be an instance of a given .
A or that specifies the type of .
A callback function
of type with parameters, the that has been checked, the of this check, and of generic type variable with optional properties from the provided , to handle them before the return. By default, it uses function.
The parameter of the function consists of the property given in the parameter of the core function, and it can't be overwritten by the given parameter of the core function.
An optional of the generic type variable is assigned to the of the given function.
The return type is a as the result of its statement, indicating the is a generic type variable by default of type captured from the supplied .
The return value is a indicating whether the provided is an instance of a given .