Skip to content

@dice-roller/rpg-dice-roller / roll

Function: roll() โ€‹

Call Signature โ€‹

roll<T>(input, options?): Roll<T, "sync">

Defined in: src/index.ts:24

Shorthand for new Roll(input, options): rolls notation (or an AST) once, without a history.

Type Parameters โ€‹

T โ€‹

T = string

Parameters โ€‹

input โ€‹

string | ExpressionNode

options? โ€‹

SyncRollOptions<T> | RollSettings<T, "sync">

Returns โ€‹

Roll<T, "sync">

Call Signature โ€‹

roll<T>(input, options): Promise<Roll<T, "async">>

Defined in: src/index.ts:28

Shorthand for new Roll(input, options): rolls notation (or an AST) once, without a history.

Type Parameters โ€‹

T โ€‹

T = string

Parameters โ€‹

input โ€‹

string | ExpressionNode

options โ€‹

AsyncRollOptions<T> | RollSettings<T, "async">

Returns โ€‹

Promise<Roll<T, "async">>

Call Signature โ€‹

roll<T>(input, options): Roll<T, "sync"> | Promise<Roll<T, "async">>

Defined in: src/index.ts:32

Shorthand for new Roll(input, options): rolls notation (or an AST) once, without a history.

Type Parameters โ€‹

T โ€‹

T = string

Parameters โ€‹

input โ€‹

string | ExpressionNode

options โ€‹

RollOptions<T, DrawMode> | RollSettings<T, DrawMode>

Returns โ€‹

Roll<T, "sync"> | Promise<Roll<T, "async">>

Call Signature โ€‹

roll<T>(input): Roll<T, "sync">

Defined in: src/index.ts:36

Shorthand for new Roll(input, options): rolls notation (or an AST) once, without a history.

Type Parameters โ€‹

T โ€‹

T = string

Parameters โ€‹

input โ€‹

string | ExpressionNode

Returns โ€‹

Roll<T, "sync">

MIT Licensed ยท Credits