From b8d11fa5cd6a1c90c56f92421f79c0177cd26407 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Fri, 5 Feb 2021 02:52:55 +0100 Subject: [PATCH] remove some redundant casts --- src/module/ds4.ts | 4 ++-- src/module/rolls/check-factory.ts | 2 +- src/module/rolls/check.ts | 2 +- src/module/rolls/roll-data.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/module/ds4.ts b/src/module/ds4.ts index b64491ae..ffd62bab 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -25,8 +25,8 @@ Hooks.once("init", async function () { CONFIG.DS4 = DS4; // Define custom Entity classes - CONFIG.Actor.entityClass = DS4Actor as typeof Actor; - CONFIG.Item.entityClass = DS4Item as typeof Item; + CONFIG.Actor.entityClass = DS4Actor; + CONFIG.Item.entityClass = DS4Item; // Define localized type labels CONFIG.Actor.typeLabels = DS4.i18n.actorTypes; diff --git a/src/module/rolls/check-factory.ts b/src/module/rolls/check-factory.ts index 5c1eb7ce..b2da3534 100644 --- a/src/module/rolls/check-factory.ts +++ b/src/module/rolls/check-factory.ts @@ -10,7 +10,7 @@ class DefaultCheckOptions implements DS4CheckFactoryOptions { readonly rollMode: DS4RollMode = "roll"; mergeWith(other: Partial): DS4CheckFactoryOptions { - return { ...this, ...other } as DS4CheckFactoryOptions; + return { ...this, ...other }; } } diff --git a/src/module/rolls/check.ts b/src/module/rolls/check.ts index 38773fb3..0fd84be2 100644 --- a/src/module/rolls/check.ts +++ b/src/module/rolls/check.ts @@ -110,7 +110,7 @@ export class DS4Check extends DiceTerm { let checked = 0; while (checked < intermediateResults.length) { - const r = (intermediateResults as Array)[checked]; + const r = intermediateResults[checked]; checked++; if (!r.active) continue; diff --git a/src/module/rolls/roll-data.ts b/src/module/rolls/roll-data.ts index 78329e44..f4440156 100644 --- a/src/module/rolls/roll-data.ts +++ b/src/module/rolls/roll-data.ts @@ -12,7 +12,7 @@ export class DefaultRollOptions implements RollOptions { public slayingDiceRepetition = false; mergeWith(other: Partial): RollOptions { - return { ...this, ...other } as RollOptions; + return { ...this, ...other }; } }