Update foundry-vtt-types

This commit is contained in:
Johannes Loher 2021-01-29 16:17:31 +01:00
parent d6b46d6183
commit 3d5912a631
2 changed files with 4 additions and 4 deletions

View file

@ -99,7 +99,7 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
case "create":
return this._createActiveEffect();
case "edit":
const effect = this.item["effects"].get(li.data("effectId")); // TODO(types): replace with item.effect once https://github.com/kmoschcau/foundry-vtt-types/pull/216 is merged
const effect = this.item.effects.get(li.data("effectId"));
return effect.sheet.render(true);
case "delete": {
return this.item.deleteEmbeddedEntity("ActiveEffect", li.data("effectId"));
@ -110,7 +110,7 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
/**
* Create a new ActiveEffect for the item using default data.
*/
private async _createActiveEffect(): Promise<unknown> {
private async _createActiveEffect(): Promise<ActiveEffect.Data> {
const label = `New Effect`;
const createData = {
@ -120,7 +120,7 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
transfer: true,
};
const effect = await ActiveEffect.create(createData, this.item);
const effect = ActiveEffect.create(createData as ActiveEffect.Data, this.item); // TODO(types): ActiveEffect.create should be able to work with only partial createData. Fix this upstream
return effect.create({});
}
}