mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-19 04:07:33 +08:00
Small refactoring, set variable node
This commit is contained in:
21
js/entity/UnionType.js
Normal file
21
js/entity/UnionType.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @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]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user