mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
21 lines
318 B
TypeScript
21 lines
318 B
TypeScript
import Roll = require('roll');
|
|
|
|
// $ExpectType Roll
|
|
const roll = new Roll();
|
|
|
|
// $ExpectType number
|
|
roll.roll('d6').result;
|
|
|
|
// $ExpectType number
|
|
roll.roll({
|
|
quantity: 2,
|
|
sides: 6,
|
|
transformations: [
|
|
'sum',
|
|
['add', 2]
|
|
]
|
|
}).result;
|
|
|
|
// $ExpectType InvalidInputError
|
|
Roll.InvalidInputError;
|