Make elements default constructible, testing wip

This commit is contained in:
barsdeveloper
2022-12-24 15:29:12 +01:00
parent 7ed36f21e5
commit c3ab6478b0
53 changed files with 992 additions and 712 deletions

View File

@@ -5,6 +5,7 @@ import TypeInitialization from "../entity/TypeInitialization"
import Utility from "../Utility"
/**
* @typedef {import("../entity/IEntity").EntityConstructor} EntityConstructor
* @typedef {import("../entity/TypeInitialization").AnyValue} AnyValue
*/
/**
@@ -117,7 +118,7 @@ export default class ISerializer {
showProperty(entity, object, attributeKey, attributeValue) {
// @ts-expect-error
const attributes = this.entityType.attributes
const attributes = /** @type {EntityConstructor} */(this.entityType).attributes
const attribute = Utility.objectGet(attributes, attributeKey)
if (attribute instanceof TypeInitialization) {
if (attribute.ignored) {