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,19 +1,24 @@
import AttributeInfo from "../../js/entity/AttributeInfo.js"
import IEntity from "../../js/entity/IEntity.js"
import Entity1 from "./Entity1.js"
import Entity3 from "./Entity3.js"
import IEntity from "../../js/entity/IEntity.js"
export default class Entity4 extends IEntity {
static attributes = {
first: {
first: new AttributeInfo({
type: Entity3,
default: new Entity3(),
inlined: true,
},
second: {
}),
second: new AttributeInfo({
default: [new Entity1({ a: 1, b: 2 }), new Entity1({ a: 11, b: 22 })],
inlined: true,
},
}),
third: new AttributeInfo({
type: Array,
default: null,
})
}
constructor() {
@@ -25,8 +30,4 @@ export default class Entity4 extends IEntity {
},
})
}
static {
this.cleanupAttributes(this.attributes)
}
}