Attributes initialization refactoring (#19)

This commit is contained in:
barsdeveloper
2024-03-24 17:30:50 +01:00
committed by GitHub
parent 5973570911
commit cc9e3d833a
93 changed files with 4134 additions and 4082 deletions

View File

@@ -1,16 +1,19 @@
import Grammar from "../serialization/Grammar.js"
import AttributeInfo from "./AttributeInfo.js"
import IEntity from "./IEntity.js"
var crypto
if (typeof window === "undefined") {
import("crypto").then(mod => crypto = mod.default).catch()
} else {
crypto = window.crypto
}
export default class GuidEntity extends IEntity {
static attributes = {
...super.attributes,
value: {
default: "",
},
}
static {
this.cleanupAttributes(this.attributes)
value: AttributeInfo.createValue(""),
}
static grammar = this.createGrammar()