Update types
This commit is contained in:
parent
ff3c09f009
commit
746d4d7a44
3 changed files with 8 additions and 8 deletions
|
@ -6,7 +6,7 @@ import { DS4Actor } from "../actor";
|
|||
/**
|
||||
* The base Sheet class for all DS4 Actors
|
||||
*/
|
||||
export class DS4ActorSheet extends ActorSheet<DS4Actor> {
|
||||
export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
|
||||
// TODO(types): Improve mergeObject in upstream so that it isn't necessary to provide all parameters (see https://github.com/League-of-Foundry-Developers/foundry-vtt-types/issues/272)
|
||||
/** @override */
|
||||
static get defaultOptions(): BaseEntitySheet.Options {
|
||||
|
@ -48,9 +48,9 @@ export class DS4ActorSheet extends ActorSheet<DS4Actor> {
|
|||
* object itemsByType.
|
||||
* @returns The data fed to the template of the actor sheet
|
||||
*/
|
||||
getData(): ActorSheet.Data<DS4Actor> | Promise<ActorSheet.Data<DS4Actor>> {
|
||||
async getData(): Promise<ActorSheet.Data<DS4Actor>> {
|
||||
const data = {
|
||||
...super.getData(),
|
||||
...(await super.getData()),
|
||||
// Add the localization config to the data:
|
||||
config: DS4,
|
||||
// Add the items explicitly sorted by type to the data:
|
||||
|
@ -73,7 +73,7 @@ export class DS4ActorSheet extends ActorSheet<DS4Actor> {
|
|||
html.find(".item-edit").on("click", (ev) => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const item = this.actor.getOwnedItem(li.data("itemId"));
|
||||
item.sheet.render(true);
|
||||
item.sheet?.render(true);
|
||||
});
|
||||
|
||||
// Delete Inventory Item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue