Update foundry-vtt-types
This commit is contained in:
parent
d6b46d6183
commit
3d5912a631
2 changed files with 4 additions and 4 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -3119,7 +3119,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"foundry-vtt-types": {
|
"foundry-vtt-types": {
|
||||||
"version": "github:League-of-Foundry-Developers/foundry-vtt-types#c25d4823c2950ce472fbac240d56ff07e2d4cdaa",
|
"version": "github:League-of-Foundry-Developers/foundry-vtt-types#e08a7166345d7905ac8324d6f418c05d98a49ebf",
|
||||||
"from": "github:League-of-Foundry-Developers/foundry-vtt-types#foundry-0.7.9",
|
"from": "github:League-of-Foundry-Developers/foundry-vtt-types#foundry-0.7.9",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
|
@ -99,7 +99,7 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
|
||||||
case "create":
|
case "create":
|
||||||
return this._createActiveEffect();
|
return this._createActiveEffect();
|
||||||
case "edit":
|
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);
|
return effect.sheet.render(true);
|
||||||
case "delete": {
|
case "delete": {
|
||||||
return this.item.deleteEmbeddedEntity("ActiveEffect", li.data("effectId"));
|
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.
|
* 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 label = `New Effect`;
|
||||||
|
|
||||||
const createData = {
|
const createData = {
|
||||||
|
@ -120,7 +120,7 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
|
||||||
transfer: true,
|
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({});
|
return effect.create({});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue