Large typedef import cleanup and smaller fixes

This commit is contained in:
barsdeveloper
2023-04-15 15:29:21 +02:00
parent baf40a9094
commit a82f61ac4a
76 changed files with 316 additions and 298 deletions

View File

@@ -1,4 +1,4 @@
/** @typedef {import("./IEntity").default} IEntity */
/** @typedef {import("./IEntity.js").default} IEntity */
export default class ComputedType {

View File

@@ -199,7 +199,12 @@ export default class ObjectEntity extends IEntity {
showDefault: false,
},
CustomProperties: {
type: [new UnionType(PinEntity, UnknownPinEntity)]
type: [new UnionType(PinEntity, UnknownPinEntity)],
},
// Legacy
Pins: {
type: [ObjectReferenceEntity],
inlined: true,
},
}
@@ -301,6 +306,8 @@ export default class ObjectEntity extends IEntity {
/** @type {IntegerEntity?} */ this.ErrorType
/** @type {String?} */ this.ErrorMsg
/** @type {(PinEntity | UnknownPinEntity)[]} */ this.CustomProperties
// Legacy
/** @type {ObjectReferenceEntity[]} */ this.Pins
}
getClass() {

View File

@@ -22,7 +22,7 @@ import Vector2DEntity from "./Vector2DEntity.js"
import VectorEntity from "./VectorEntity.js"
/**
* @typedef {import("./IEntity").AnyValue} AnyValue
* @typedef {import("./IEntity.js").AnyValue} AnyValue
* @typedef {import("lit").CSSResult} CSSResult
*/

View File

@@ -1,4 +1,4 @@
/** @typedef {import("./IEntity").AnyValueConstructor<*>} AnyValueConstructor */
/** @typedef {import("./IEntity.js").AnyValueConstructor<*>} AnyValueConstructor */
export default class UnionType {

View File

@@ -3,4 +3,8 @@ import PinEntity from "./PinEntity.js"
export default class UnknownPinEntity extends PinEntity {
static lookbehind = ""
constructor(values = {}) {
super(values, true)
}
}