Type Alias: RandomSource
ts
type RandomSource = object;Defined in: src/random.ts:9
Where the randomness comes from.
A source hands out unsigned 32-bit integers. Two are offered: the browser's cryptographic generator, which is the default and the fair one, and a seeded generator for rolls that somebody else must be able to reproduce (a shared link, a test, a table that wants to check the dungeon master's dice).
Properties
seed
ts
readonly seed: string | null;Defined in: src/random.ts:13
The seed, when the source is reproducible; null for crypto.
Methods
next()
ts
next(): number;Defined in: src/random.ts:11
An integer in [0, 2^32).
Returns
number