Reference · Rules, games and records
Randomtype
A source of random numbers from 0 up to but not including 1.
Import it
import type { Random } from "@johnmorrisdotca/sugoroku";
Definition
type Random = () => number;
Examples
import type { Random } from "@johnmorrisdotca/sugoroku";
import { seededRandom } from "@johnmorrisdotca/sugoroku";
const value: Random = seededRandom(42);
console.log(value);[Function (anonymous)]What it prints (run when this page was built)