TypeGuard wrapper for instanceof keyword.
class Person { constructor(public name: string) {}}const john = new Person("John");isInstanceOf(john, Person);// => true// john is instanceof Person Copy
class Person { constructor(public name: string) {}}const john = new Person("John");isInstanceOf(john, Person);// => true// john is instanceof Person
The type of the entity class.
entity
The instance of the class to check.
The class to ensure the instance is from.
instance
TypeGuard wrapper for instanceof keyword.
Example