mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-13 16:44:49 +08:00
22 lines
386 B
JavaScript
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]
|
|
}
|
|
}
|