mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-20 04:47:35 +08:00
Type initialization using objects
This commit is contained in:
19
cypress/fixtures/SimpleEntity.js
Normal file
19
cypress/fixtures/SimpleEntity.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import IEntity from "../../js/entity/IEntity"
|
||||
|
||||
export default class SimpleEntity extends IEntity {
|
||||
|
||||
static attributes = {
|
||||
someNumber: 567,
|
||||
someString: "alpha",
|
||||
someString2: "beta",
|
||||
someBoolean: true,
|
||||
someBoolean2: false,
|
||||
someObjectString: new String("gamma"),
|
||||
someArray: [400, 500, 600, 700, 800],
|
||||
someSet: new Set([10, 20, 30, 40, 50, 60, 70]),
|
||||
}
|
||||
|
||||
static {
|
||||
this.cleanupAttributes(this.attributes)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user