FEAT: formatting code

FIX: fix fields used
FEAT: add jsdoc
This commit is contained in:
Joaquin Pereyra 2025-06-06 18:17:14 -03:00
parent 6c147a5c00
commit f3942280b6
13 changed files with 96 additions and 114 deletions

View file

@ -3,6 +3,15 @@
* that resolves to either the document, the index(for items in compenidums) or the UUID string.
*/
export default class ForeignDocumentUUIDField extends foundry.data.fields.DocumentUUIDField {
/**
* @param {foundry.data.types.DocumentUUIDFieldOptions} [options] Options which configure the behavior of the field
* @param {foundry.data.types.DataFieldContext} [context] Additional context which describes the field
*/
constructor(options, context) {
super(options, context);
}
/** @inheritdoc */
static get _defaults() {
return foundry.utils.mergeObject(super._defaults, {
@ -25,6 +34,7 @@ export default class ForeignDocumentUUIDField extends foundry.data.fields.Docume
}
};
}
/**@override */
toObject(value) {
return value?.uuid ?? value;