Files
ueblueprint/js/entity/SerializedType.js
barsdeveloper 57ef15c943 Various fixes
2022-09-09 20:39:08 +02:00

27 lines
549 B
JavaScript

export default class SerializedType {
#types
get types() {
return this.#types
}
set types(v) {
this.#types = v
}
#stringFallback
get stringFallback() {
return this.#stringFallback
}
set stringFallback(v) {
this.#stringFallback = v
}
constructor([...acceptedTypes], stringFallback = true) {
this.#types = [...new Set([
...acceptedTypes,
...(stringFallback ? [String] : [])
])]
this.#stringFallback = stringFallback
}
}