Update foundry-vtt-types to remove some type workarounds

This commit is contained in:
Johannes Loher 2021-03-16 07:11:12 +01:00
parent 48e06678a9
commit 67d0253f66
5 changed files with 9 additions and 12 deletions

View file

@ -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);
}
}

View file

@ -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<=>]+)?)?$/;
}