← Back to index
function assertInstanceOf

Make an assertion that obj is an instance of type. If not then throw.

Type Parameters

🔗
T extends AnyConstructor

Parameters

🔗
actual: unknown
🔗
expectedType: T
🔗
msg

Return Type

🔗
asserts actual is GetConstructorType<T>