Function assertInstanceOf
- assert
Instance <T>(actual, expectedType, msg?): asserts actual is InstanceType<T>Of Type Parameters
Parameters
- actual: unknown
The object to check.
- expectedType: T
The expected class constructor.
- msg: string = ""
The optional message to display if the assertion fails.
Returns asserts actual is InstanceType<T>
- actual: unknown
Make an assertion that
objis an instance oftype. If not then throw.