Checks if the assertion passes or if the value is null.
const maybeString = nullable(string);maybeString(1); // Error: typemaybeString("hello"); // passesmaybeString(null); // passes Copy
const maybeString = nullable(string);maybeString(1); // Error: typemaybeString("hello"); // passesmaybeString(null); // passes
Assertion to be checked.
Checks if the assertion passes or if the value is null.
Example