diff --git a/package.json b/package.json index a27be464..440ce47c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "postinstall": "husky install" }, "devDependencies": { - "@league-of-foundry-developers/foundry-vtt-types": "^0.7.9-1", + "@league-of-foundry-developers/foundry-vtt-types": "^0.7.9-3", "@types/fs-extra": "^9.0.8", "@types/jest": "^26.0.20", "@typescript-eslint/eslint-plugin": "^4.16.1", diff --git a/src/module/macros/item-macro.ts b/src/module/macros/item-macro.ts index d6ed404b..0abc24f4 100644 --- a/src/module/macros/item-macro.ts +++ b/src/module/macros/item-macro.ts @@ -23,7 +23,7 @@ export async function createItemMacro(itemData: DS4ItemData, slot: string): Prom }, { displaySheet: false }, )); - game.user?.assignHotbarMacro(macro, (slot as unknown) as number); // TODO(types): adjust so that cast is not needed, slot should be an optional string + game.user?.assignHotbarMacro(macro, slot); } /** diff --git a/src/module/rolls/roll.ts b/src/module/rolls/roll.ts index 22ec0cd5..e0720a3c 100644 --- a/src/module/rolls/roll.ts +++ b/src/module/rolls/roll.ts @@ -8,7 +8,7 @@ export class DS4Roll = Record * template if the first dice term is a ds4 check. * @override */ - async render(chatOptions: Roll.ChatOptions = {}): Promise { + async render(chatOptions: Roll.ChatOptions = {}): Promise { chatOptions = mergeObject( { user: game.user?._id, @@ -39,6 +39,6 @@ export class DS4Roll = Record }; // Render the roll display template - return (renderTemplate(chatOptions.template ?? "", chatData) as unknown) as Promise; // TODO(types): Make this cast unnecessary by fixing upstream + return renderTemplate(chatOptions.template ?? "", chatData); } } diff --git a/src/module/rolls/slaying-dice-modifier.ts b/src/module/rolls/slaying-dice-modifier.ts index c92242ac..0af9d6b9 100644 --- a/src/module/rolls/slaying-dice-modifier.ts +++ b/src/module/rolls/slaying-dice-modifier.ts @@ -1,9 +1,6 @@ import { DS4Check } from "./check"; export default function registerSlayingDiceModifier(): void { - // TODO(types): Adjust types to allow extension of DiceTerm.MODIFIERS (see https://github.com/League-of-Foundry-Developers/foundry-vtt-types/pull/573) - // eslint-disable-next-line - // @ts-ignore DicePool.MODIFIERS.x = slay; DicePool.POOL_REGEX = /^{([^}]+)}([A-z]([A-z0-9<=>]+)?)?$/; } diff --git a/yarn.lock b/yarn.lock index 42ba48ab..2c6ae598 100644 --- a/yarn.lock +++ b/yarn.lock @@ -647,9 +647,9 @@ __metadata: languageName: node linkType: hard -"@league-of-foundry-developers/foundry-vtt-types@npm:^0.7.9-1": - version: 0.7.9-1 - resolution: "@league-of-foundry-developers/foundry-vtt-types@npm:0.7.9-1" +"@league-of-foundry-developers/foundry-vtt-types@npm:^0.7.9-3": + version: 0.7.9-3 + resolution: "@league-of-foundry-developers/foundry-vtt-types@npm:0.7.9-3" dependencies: "@types/howler": 2.2.1 "@types/jquery": 3.5.1 @@ -659,7 +659,7 @@ __metadata: pixi.js: 5.3.4 tinymce: 5.6.2 typescript: ^4.1.4 - checksum: 1b2e311e5ab2db9da4d67fee7b5ab038b228b76ff78f90830f770ae4cee7191f652a18dec0161cc7e2e9696fc06969e23b33a0402249bc4251cc557fa5efc430 + checksum: 75524c7aa78ddb77cad1a9d041af30ae5bbd708f5b26568dabbb3d913a4643aefcc6f2ed80e1e76b3c17050579665eab155f035f840db6397691cf68eeee9b3f languageName: node linkType: hard @@ -2820,7 +2820,7 @@ __metadata: version: 0.0.0-use.local resolution: "dungeonslayers4@workspace:." dependencies: - "@league-of-foundry-developers/foundry-vtt-types": ^0.7.9-1 + "@league-of-foundry-developers/foundry-vtt-types": ^0.7.9-3 "@types/fs-extra": ^9.0.8 "@types/jest": ^26.0.20 "@typescript-eslint/eslint-plugin": ^4.16.1