New LinearColorEntity, string serialization fixed

This commit is contained in:
barsdeveloper
2022-05-11 21:01:54 +02:00
parent 3c643f0c6a
commit e416591784
20 changed files with 707 additions and 125 deletions

View File

@@ -0,0 +1,26 @@
// @ts-check
/**
* @typedef {import("../entity/IEntity").default} IEntity
* @typedef {(new (object?: Object) => IEntity) | StringConstructor | NumberConstructor | BooleanConstructor} Constructor
* @typedef {Constructor|Constructor[]} AcceptedType
*/
export default class SerializedType {
/** @type {(Constructor|Array<Constructor>)[]} */
#types
get types() {
return this.#types
}
set types(v) {
this.#types = v
}
/**
* @param {...AcceptedType} acceptedTypes
*/
constructor(...acceptedTypes) {
this.#types = acceptedTypes
}
}