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
|
@ -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<=>]+)?)?$/;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue