Function hasPrototype
- hasPrototype<T extends new (...args: any[]) => any>(
target: new (...args: any[]) => any,
Prototype: T,
): target is T Type Parameters
Parameters
- target: new (...args: any[]) => any
Any target class / constructor function to test.
- Prototype: T
Class / constructor function to find.
Returns target is T
Target matches prototype.
- target: new (...args: any[]) => any
Returns whether the target is or has the given prototype walking up the prototype chain.