Update foundry-vtt-types to remove some type workarounds
This commit is contained in:
parent
48e06678a9
commit
67d0253f66
5 changed files with 9 additions and 12 deletions
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@ export class DS4Roll<D extends Record<string, unknown> = Record<string, unknown>
|
|||
* template if the first dice term is a ds4 check.
|
||||
* @override
|
||||
*/
|
||||
async render(chatOptions: Roll.ChatOptions = {}): Promise<HTMLElement> {
|
||||
async render(chatOptions: Roll.ChatOptions = {}): Promise<string> {
|
||||
chatOptions = mergeObject(
|
||||
{
|
||||
user: game.user?._id,
|
||||
|
@ -39,6 +39,6 @@ export class DS4Roll<D extends Record<string, unknown> = Record<string, unknown>
|
|||
};
|
||||
|
||||
// Render the roll display template
|
||||
return (renderTemplate(chatOptions.template ?? "", chatData) as unknown) as Promise<HTMLElement>; // TODO(types): Make this cast unnecessary by fixing upstream
|
||||
return renderTemplate(chatOptions.template ?? "", chatData);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<=>]+)?)?$/;
|
||||
}
|
||||
|
|
10
yarn.lock
10
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
|
||||
|
|
Loading…
Reference in a new issue