UNPKG

@mrprim/dice-roller

Version:

A typescript library for rolling dice using dice notation.

17 lines (16 loc) 452 B
import { DiceTypeInput, RollInstruction } from './parseInput'; interface RollResultDetail { total: number; instructions: RollInstruction[]; details: RollDetail[]; } interface RollDetail { id: number; instructionId: number; modifier: number; diceType: DiceTypeInput; value: number; discard: boolean; } declare const roll: (input: string | number, verbose?: boolean) => number | RollResultDetail; export default roll;