diff --git a/js/element/PinElement.js b/js/element/PinElement.js index 5c2ff9a..7b1e475 100644 --- a/js/element/PinElement.js +++ b/js/element/PinElement.js @@ -27,6 +27,10 @@ import VectorPinTemplate from "../template/pin/VectorPinTemplate.js" * @typedef {import("lit").CSSResult} CSSResult * @typedef {typeof PinElement} PinElementConstructor */ +/** + * @template T + * @typedef {import("parsimmon").Success} Success + */ /** * @template {AnyValue} T @@ -54,7 +58,7 @@ export default class PinElement extends IElement { type: GuidEntity, converter: { fromAttribute: (value, type) => value - ? Grammar.guidEntity.parse(value).value + ? /** @type {Success} */(Grammar.guidEntity.parse(value)).value : null, toAttribute: (value, type) => value?.toString(), }, @@ -75,7 +79,7 @@ export default class PinElement extends IElement { type: LinearColorEntity, converter: { fromAttribute: (value, type) => value - ? Grammar.linearColorFromAnyFormat.parse(value).value + ? /** @type {Success} */(Grammar.linearColorFromAnyFormat.parse(value)).value : null, toAttribute: (value, type) => value ? Utility.printLinearColor(value) : null, },