mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-20 21:07:37 +08:00
How to use
This commit is contained in:
@@ -184,6 +184,7 @@ export default class IEntity {
|
||||
} else if (attributeType instanceof ComputedType) {
|
||||
return undefined
|
||||
} else {
|
||||
// @ts-expect-error
|
||||
return () => new attributeType()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -74,6 +74,7 @@ export default class ObjectSerializer extends Serializer {
|
||||
attributeSeparator,
|
||||
trailingSeparator,
|
||||
attributeValueConjunctionSign,
|
||||
// @ts-expect-error
|
||||
key => entity[key] instanceof ObjectEntity ? "" : attributeKeyPrinter(key)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ export default class Serializer {
|
||||
|
||||
/** @param {T} value */
|
||||
write(value, insideString = false) {
|
||||
// @ts-expect-error
|
||||
return this.doWrite(value, insideString)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user