mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-02 05:04:43 +08:00
New LinearColorEntity, string serialization fixed
This commit is contained in:
26
js/entity/SerializedType.js
Normal file
26
js/entity/SerializedType.js
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user