Files
ueblueprint/js/entity/IdentifierEntity.js
barsdeveloper a0eeca11d1 Various fixes
2022-03-28 23:04:24 +02:00

29 lines
503 B
JavaScript

// @ts-check
import IEntity from "./IEntity"
export default class IdentifierEntity extends IEntity {
static attributes = {
value: String,
}
constructor(options = {}) {
// Not instanceof to pick also primitive string
if (options.constructor === String) {
options = {
value: options
}
}
super(options)
}
valueOf() {
return this.value
}
toString() {
return this.value
}
}