Variable booleanConst

boolean: Schema<boolean> = ...

The boolean schema validates that the input is either true or false.

Example

import { boolean } from "typerun/schema";
import { is } from "typerun";

if (is(boolean)(true)) {
console.log("true is a boolean");
}

if (!is(boolean)(undefined)) {
console.log("undefined is not a boolean");
}