Update types
This commit is contained in:
parent
d7c617facb
commit
98568de676
3 changed files with 12 additions and 14 deletions
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -3712,9 +3712,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"uglify-js": {
|
"uglify-js": {
|
||||||
"version": "3.12.6",
|
"version": "3.12.7",
|
||||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.6.tgz",
|
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.7.tgz",
|
||||||
"integrity": "sha512-aqWHe3DfQmZUDGWBbabZ2eQnJlQd1fKlMUu7gV+MiTuDzdgDw31bI3wA2jLLsV/hNcDP26IfyEgSVoft5+0SVw==",
|
"integrity": "sha512-SIZhkoh+U/wjW+BHGhVwE9nt8tWJspncloBcFapkpGRwNPqcH8pzX36BXe3TPBjzHWPMUZotpCigak/udWNr1Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
import { DS4 } from "../../config";
|
import { DS4 } from "../../config";
|
||||||
import { DS4Item } from "../../item/item";
|
import { DS4Item } from "../../item/item";
|
||||||
import { DS4ItemData, ItemType } from "../../item/item-data";
|
import { DS4ItemData } from "../../item/item-data";
|
||||||
import { DS4Actor } from "../actor";
|
import { DS4Actor } from "../actor";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the basic ActorSheet with some very simple modifications
|
* 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> {
|
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 */
|
/** @override */
|
||||||
static get defaultOptions(): BaseEntitySheet.Options {
|
static get defaultOptions(): BaseEntitySheet.Options {
|
||||||
const superDefaultOptions = super.defaultOptions;
|
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
|
* 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
|
||||||
*/
|
*/
|
||||||
private _onItemCreate(event: JQuery.ClickEvent): Promise<DS4ItemData> {
|
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.
|
* Handle changes to properties of an Owned Item from within character sheet.
|
||||||
* Can currently properly bind: see getValue().
|
* Can currently properly bind: see getValue().
|
||||||
* Assumes the item property is given as the value of the HTML element property 'data-property'.
|
* 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
|
||||||
*/
|
*/
|
||||||
private _onItemChange(ev: JQuery.ChangeEvent): void {
|
private _onItemChange(ev: JQuery.ChangeEvent): void {
|
||||||
|
@ -207,7 +206,7 @@ export class DS4ActorSheet extends ActorSheet<unknown, DS4Actor> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle clickable rolls.
|
* Handle clickable rolls.
|
||||||
* @param {JQuery.ClickEvent} event The originating click event
|
* @param event The originating click event
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private _onRoll(event: JQuery.ClickEvent): void {
|
private _onRoll(event: JQuery.ClickEvent): void {
|
||||||
|
@ -239,6 +238,6 @@ export class DS4ActorSheet extends ActorSheet<unknown, DS4Actor> {
|
||||||
);
|
);
|
||||||
return false;
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,8 @@ import { isDS4ItemDataTypePhysical } from "./item-data";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the basic ItemSheet with some very simple modifications
|
* 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> {
|
export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
|
||||||
/** @override */
|
/** @override */
|
||||||
static get defaultOptions(): BaseEntitySheet.Options {
|
static get defaultOptions(): BaseEntitySheet.Options {
|
||||||
|
@ -85,7 +84,7 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle management of ActiveEffects.
|
* 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> {
|
private async _onManageActiveEffect(event: JQuery.ClickEvent): Promise<unknown> {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Loading…
Reference in a new issue