Skip to content

Commit

Permalink
Tweak return types (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxjrvs authored May 4, 2024
1 parent a6d3bbd commit 626356b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "randsum",
"version": "4.1.2",
"version": "4.1.3",
"private": false,
"author": "Alex Jarvis",
"icon": "https://raw.githubusercontent.com/RANDSUM/randsum-ts/main/icon.webp",
Expand Down
6 changes: 3 additions & 3 deletions src/roll/parse-roll-arguments/parameterize-roll-argument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ function parseDiceOptions(
}
}

function parameterizeRollArgument<D extends number | string>(
function parameterizeRollArgument(
argument: CoreRollArgument | undefined
): DicePoolParameters<D> {
): DicePoolParameters<string> | DicePoolParameters<number> {
const options = parseDiceOptions(argument)
const die = dieFactory(options.sides)
return {
Expand All @@ -42,7 +42,7 @@ function parameterizeRollArgument<D extends number | string>(
die,
notation: formatNotation(options),
description: formatDescription(options)
} as DicePoolParameters<D>
} as DicePoolParameters<string> | DicePoolParameters<number>
}

export default parameterizeRollArgument

0 comments on commit 626356b

Please sign in to comment.