Rename an interface

This commit is contained in:
Johannes Loher 2021-03-13 18:53:26 +01:00
parent 5d3d5bc533
commit 0b98925aeb

View file

@ -6,7 +6,7 @@ export default function evaluateCheck(
minimumFumbleResult = 20,
canFumble = true,
}: { maximumCoupResult?: number; minimumFumbleResult?: number; canFumble?: boolean } = {},
): DS4SubCheckResult[] {
): SubCheckResult[] {
const diceWithSubChecks = assignSubChecksToDice(dice, checkTargetNumber, {
maximumCoupResult: maximumCoupResult,
});
@ -81,7 +81,7 @@ function shouldUseCoupForLastSubCheck(
);
}
interface DS4SubCheckResult extends DieWithSubCheck, DiceTerm.Result {
interface SubCheckResult extends DieWithSubCheck, DiceTerm.Result {
success?: boolean;
failure?: boolean;
count?: number;
@ -94,9 +94,9 @@ function evaluateDiceWithSubChecks(
minimumFumbleResult,
canFumble,
}: { maximumCoupResult: number; minimumFumbleResult: number; canFumble: boolean },
): DS4SubCheckResult[] {
): SubCheckResult[] {
return results.map((dieWithSubCheck, index) => {
const result: DS4SubCheckResult = {
const result: SubCheckResult = {
...dieWithSubCheck,
active: dieWithSubCheck.result <= dieWithSubCheck.checkTargetNumber,
discarded: dieWithSubCheck.result > dieWithSubCheck.checkTargetNumber,