Update types

This commit is contained in:
Johannes Loher 2021-02-07 11:15:37 +01:00
parent d7c617facb
commit 98568de676
3 changed files with 12 additions and 14 deletions

6
package-lock.json generated
View file

@ -3712,9 +3712,9 @@
"dev": true
},
"uglify-js": {
"version": "3.12.6",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.6.tgz",
"integrity": "sha512-aqWHe3DfQmZUDGWBbabZ2eQnJlQd1fKlMUu7gV+MiTuDzdgDw31bI3wA2jLLsV/hNcDP26IfyEgSVoft5+0SVw==",
"version": "3.12.7",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.7.tgz",
"integrity": "sha512-SIZhkoh+U/wjW+BHGhVwE9nt8tWJspncloBcFapkpGRwNPqcH8pzX36BXe3TPBjzHWPMUZotpCigak/udWNr1Q==",
"dev": true,
"optional": true
},

View file

@ -1,15 +1,14 @@
import { DS4 } from "../../config";
import { DS4Item } from "../../item/item";
import { DS4ItemData, ItemType } from "../../item/item-data";
import { DS4ItemData } from "../../item/item-data";
import { DS4Actor } from "../actor";
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
// TODO(types): provide proper types for all generic parameters
// TODO(types): Remove first generic parameter once https://github.com/League-of-Foundry-Developers/foundry-vtt-types/pull/273 is merged
export class DS4ActorSheet extends ActorSheet<unknown, DS4Actor> {
// TODO(types): Improve mergeObject in upstream so that it isn't necessary to provide all parameters
// 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 {
const superDefaultOptions = super.defaultOptions;
@ -99,7 +98,7 @@ export class DS4ActorSheet extends ActorSheet<unknown, DS4Actor> {
/**
* Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset
* @param {JQuery.ClickEvent} event The originating click event
* @param event The originating click event
* @private
*/
private _onItemCreate(event: JQuery.ClickEvent): Promise<DS4ItemData> {
@ -125,7 +124,7 @@ export class DS4ActorSheet extends ActorSheet<unknown, DS4Actor> {
* 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<HTMLElement>} ev The originating change event
* @param ev The originating change event
* @private
*/
private _onItemChange(ev: JQuery.ChangeEvent): void {
@ -207,7 +206,7 @@ export class DS4ActorSheet extends ActorSheet<unknown, DS4Actor> {
/**
* Handle clickable rolls.
* @param {JQuery.ClickEvent} event The originating click event
* @param event The originating click event
* @private
*/
private _onRoll(event: JQuery.ClickEvent): void {
@ -239,6 +238,6 @@ export class DS4ActorSheet extends ActorSheet<unknown, DS4Actor> {
);
return false;
}
return super["_onDropItem"](event, data); // TODO(types): Add _onDropItem to upstream
return super["_onDropItem"](event, data); // TODO(types): Add _onDropItem to upstream (fixed by https://github.com/League-of-Foundry-Developers/foundry-vtt-types/pull/273)
}
}

View file

@ -4,9 +4,8 @@ import { isDS4ItemDataTypePhysical } from "./item-data";
/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
// TODO(types): provide proper types for all generic parameters
// TODO(types): Remove first generic parameter once https://github.com/League-of-Foundry-Developers/foundry-vtt-types/pull/273 is merged
export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
/** @override */
static get defaultOptions(): BaseEntitySheet.Options {
@ -85,7 +84,7 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
/**
* Handle management of ActiveEffects.
* @param {Event} event The originating click event
* @param event The originating click event
*/
private async _onManageActiveEffect(event: JQuery.ClickEvent): Promise<unknown> {
event.preventDefault();