Small refactoring, set variable node

This commit is contained in:
barsdeveloper
2022-11-19 18:40:20 +01:00
parent 0981c15372
commit b55779312b
34 changed files with 524 additions and 253 deletions

21
js/entity/UnionType.js Normal file
View 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]
}
}