Make an assertion that obj is not an instance of type. If so, then throw.
obj
type
Rest
Optional
24.7.0
import { assertNotInstanceOf } from "assert";assertNotInstanceOf(new Date(), Number); // Doesn't throwassertNotInstanceOf(new Date(), Date); // Throws Copy
import { assertNotInstanceOf } from "assert";assertNotInstanceOf(new Date(), Number); // Doesn't throwassertNotInstanceOf(new Date(), Date); // Throws
Make an assertion that
obj
is not an instance oftype
. If so, then throw.