Files
ueblueprint/js/entity/IdentifierEntity.js
2022-11-21 11:45:43 +01:00

27 lines
507 B
JavaScript

import IEntity from "./IEntity"
export default class IdentifierEntity extends IEntity {
static attributes = {
value: String,
}
static attributeConverter = {
fromAttribute: (value, type) => new IdentifierEntity(value),
toAttribute: (value, type) => value.toString()
}
constructor(values) {
super(values)
/** @type {String} */ this.value
}
valueOf() {
return this.value
}
toString() {
return this.value
}
}