Inline attributes semantics and tests

This commit is contained in:
barsdeveloper
2023-04-09 10:41:50 +02:00
parent 0a40f0b33c
commit 53d79a16f5
22 changed files with 508 additions and 382 deletions

View File

@@ -0,0 +1,29 @@
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: {
type: Entity3,
inlined: true,
},
second: {
default: [new Entity1({ a: 1, b: 2 }), new Entity1({ a: 11, b: 22 })],
inlined: true,
},
third: {
type: [{
type: Entity1,
inlined: true,
}],
default: [new Entity1({ a: -1, b: -2 })],
inlined: true,
}
}
static {
this.cleanupAttributes(this.attributes)
}
}