Assert that a value is the given type
npm install @std-types/assert-type@std-types/assert-typeAssert that a value is the given type
``sh`
npm install @std-types/assert-type
`ts
import assertType, { getAssertType } from "@std-types/assert-type";
const assertString = getAssertType("string");
assertString("hello"); // OK
assertString(42); // Error
assertType("hello", isString); // OK
assertType(42, isString); // Error
``