Skip to content

Function: addToHistory() ​

ts
function addToHistory(
   history, 
   roll, 
   limit?
): Roll[];

Defined in: src/history.ts:10

Add a roll to the end, oldest dropped past the limit. Returns a new array.

Parameters ​

history ​

readonly Roll[]

roll ​

Roll

limit? ​

number = HISTORY_LIMIT

Returns ​

Roll[]

MIT © John Morris