remove some redundant casts

This commit is contained in:
Johannes Loher 2021-02-05 02:52:55 +01:00
parent 2641b1ee74
commit b8d11fa5cd
4 changed files with 5 additions and 5 deletions

View file

@ -25,8 +25,8 @@ Hooks.once("init", async function () {
CONFIG.DS4 = DS4; CONFIG.DS4 = DS4;
// Define custom Entity classes // Define custom Entity classes
CONFIG.Actor.entityClass = DS4Actor as typeof Actor; CONFIG.Actor.entityClass = DS4Actor;
CONFIG.Item.entityClass = DS4Item as typeof Item; CONFIG.Item.entityClass = DS4Item;
// Define localized type labels // Define localized type labels
CONFIG.Actor.typeLabels = DS4.i18n.actorTypes; CONFIG.Actor.typeLabels = DS4.i18n.actorTypes;

View file

@ -10,7 +10,7 @@ class DefaultCheckOptions implements DS4CheckFactoryOptions {
readonly rollMode: DS4RollMode = "roll"; readonly rollMode: DS4RollMode = "roll";
mergeWith(other: Partial<DS4CheckFactoryOptions>): DS4CheckFactoryOptions { mergeWith(other: Partial<DS4CheckFactoryOptions>): DS4CheckFactoryOptions {
return { ...this, ...other } as DS4CheckFactoryOptions; return { ...this, ...other };
} }
} }

View file

@ -110,7 +110,7 @@ export class DS4Check extends DiceTerm {
let checked = 0; let checked = 0;
while (checked < intermediateResults.length) { while (checked < intermediateResults.length) {
const r = (intermediateResults as Array<RollResult>)[checked]; const r = intermediateResults[checked];
checked++; checked++;
if (!r.active) continue; if (!r.active) continue;

View file

@ -12,7 +12,7 @@ export class DefaultRollOptions implements RollOptions {
public slayingDiceRepetition = false; public slayingDiceRepetition = false;
mergeWith(other: Partial<RollOptions>): RollOptions { mergeWith(other: Partial<RollOptions>): RollOptions {
return { ...this, ...other } as RollOptions; return { ...this, ...other };
} }
} }