mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
27 lines
603 B
JavaScript
27 lines
603 B
JavaScript
// @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
|
|
}
|
|
}
|