From 6c3432cb269a66b65159e772ad9cc00d92fb21c7 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sun, 31 Jan 2021 19:57:14 +0100 Subject: [PATCH] update type definitions --- package-lock.json | 2 +- src/module/actor/actor.ts | 2 +- src/module/actor/sheets/actor-sheet.ts | 6 +++--- src/module/ds4.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1ac37387..1e3ef9af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3119,7 +3119,7 @@ } }, "foundry-vtt-types": { - "version": "github:League-of-Foundry-Developers/foundry-vtt-types#e08a7166345d7905ac8324d6f418c05d98a49ebf", + "version": "github:League-of-Foundry-Developers/foundry-vtt-types#cc36aef8865034a37e56ac01b27c8a0746253fbb", "from": "github:League-of-Foundry-Developers/foundry-vtt-types#foundry-0.7.9", "dev": true, "requires": { diff --git a/src/module/actor/actor.ts b/src/module/actor/actor.ts index 702a70fb..6c68e460 100644 --- a/src/module/actor/actor.ts +++ b/src/module/actor/actor.ts @@ -3,7 +3,7 @@ import { DS4Item } from "../item/item"; import { DS4Armor, DS4Shield, ItemType } from "../item/item-data"; import { DS4ActorData } from "./actor-data"; -export class DS4Actor extends Actor { +export class DS4Actor extends Actor { /** @override */ prepareDerivedData(): void { const data = this.data; diff --git a/src/module/actor/sheets/actor-sheet.ts b/src/module/actor/sheets/actor-sheet.ts index e4095016..239df189 100644 --- a/src/module/actor/sheets/actor-sheet.ts +++ b/src/module/actor/sheets/actor-sheet.ts @@ -117,17 +117,17 @@ export class DS4ActorSheet extends ActorSheet { }; // Finally, create the item! - return this.actor.createOwnedItem(itemData as DS4ItemData); // TODO(types): Improve upstream typing of createOwnedItem. It is possible to leave parts out here. Should be fine after https://github.com/League-of-Foundry-Developers/foundry-vtt-types/pull/4/ is merged + return this.actor.createOwnedItem(itemData); } /** * Handle changes to properties of an Owned Item from within character sheet. * Can currently properly bind: see getValue(). * Assumes the item property is given as the value of the HTML element property 'data-property'. - * @param {JQuery.ChangeEvent} ev The originating change event + * @param {JQuery.ChangeEvent} ev The originating change event * @private */ - private _onItemChange(ev: JQuery.ChangeEvent): void { + private _onItemChange(ev: JQuery.ChangeEvent): void { ev.preventDefault(); console.log("Current target:", $(ev.currentTarget).get(0)["name"]); const el: HTMLFormElement = $(ev.currentTarget).get(0); diff --git a/src/module/ds4.ts b/src/module/ds4.ts index 7eea2bbf..f057db5d 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -33,7 +33,7 @@ Hooks.once("init", async function () { CONFIG.Item.typeLabels = DS4.i18n.itemTypes; // Configure Dice - CONFIG.Dice.types = [Die, DS4Check]; + CONFIG.Dice.types = [Die, DS4Check]; // TODO(types) fix upstream CONFIG.Dice.terms = { c: Coin, d: Die,