How to use

This commit is contained in:
barsdeveloper
2023-05-24 19:45:01 +02:00
parent 4b7bce2211
commit 9fc936f228
6 changed files with 28 additions and 5 deletions

View File

@@ -184,6 +184,7 @@ export default class IEntity {
} else if (attributeType instanceof ComputedType) {
return undefined
} else {
// @ts-expect-error
return () => new attributeType()
}
}

View File

@@ -213,6 +213,7 @@ export default class PinEntity extends IEntity {
getDefaultValue(maybeCreate = false) {
if (this.DefaultValue === undefined && maybeCreate) {
// @ts-expect-error
this.DefaultValue = new (this.getEntityType(true))()
}
return this.DefaultValue