Checks that the value is of the provided type.

const string = type<string>("string");

string(1); // Error: type
string("hello"); // passes