Skip to content

Function: rollFrom() ​

ts
function rollFrom(
   spec, 
   faces, 
   id, 
   at, 
   seed
): Roll | null;

Defined in: src/dice.ts:1010

A roll put back together from its spec and its faces: for a history read from storage and a roll read from a link. The dice, which are kept and the total are all worked out again, never trusted as given. Null when the dice could not have shown those faces.

Parameters ​

spec ​

RollSpec

faces ​

readonly unknown[]

id ​

string

at ​

number

seed ​

string | null

Returns ​

Roll | null

MIT © John Morris