Variable numberConst

number: Schema<number> = ...

The number schema validates that the input is a number, and not NaN.

Example

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

if (is(number)(42)) {
console.log("42 is a number");
}

if (!is(number)(true)) {
console.log("true is not a number");
}

if (!is(number)(NaN)) {
console.log("NaN is not a number");
}