Checks that the value is of the provided type.
const string = type<string>("string");string(1); // Error: typestring("hello"); // passes Copy
const string = type<string>("string");string(1); // Error: typestring("hello"); // passes
Type to be validated against.
Checks that the value is of the provided type.
Example