Files
ueblueprint/js/entity/UnionType.js
2022-11-19 18:40:20 +01:00

22 lines
386 B
JavaScript

/**
* @template T
* @typedef {import("./TypeInitialization").AnyValueConstructor<T>} AnyValueConstructor
*/
export default class UnionType {
#types
get types() {
return this.#types
}
/** @param {...AnyValueConstructor<any>} types */
constructor(...types) {
this.#types = types
}
getFirstType() {
return this.#types[0]
}
}