assertNotInstanceOf
import { assertNotInstanceOf } from "jsr:@ende/assert";function
function assertNotInstanceOf<A, T>(actual: A, unexpectedType: new (...args: any[]) => T, msg?: string): asserts actual is Exclude<A, T>Make an assertion that obj is not an instance of type.
If so, then throw.
actual: AThe object to check.
unexpectedType: new (...args: any[]) => TThe class constructor to check against.
msg?: stringThe optional message to display if the assertion fails.
Example: Usage
import { assertNotInstanceOf } from "@ende/assert";
assertNotInstanceOf(new Date(), Number); // Doesn't throw
assertNotInstanceOf(new Date(), Date); // Throws