Serialization methods names simplified

This commit is contained in:
barsdeveloper
2023-04-05 21:38:17 +02:00
parent 721db0702b
commit a9e4a4f66f
10 changed files with 30 additions and 30 deletions

View File

@@ -131,7 +131,7 @@ export default class IEntity {
if (value?.constructor === String && attribute.serialized && defaultType !== String) {
value = SerializerFactory
.getSerializer(/** @type {AnyValueConstructor<*>} */(defaultType))
.deserialize(/** @type {String} */(value))
.read(/** @type {String} */(value))
}
assignAttribute(Utility.sanitize(value, /** @type {AnyValueConstructor<*>} */(defaultType)))
continue // We have a value, need nothing more
@@ -156,7 +156,7 @@ export default class IEntity {
if (defaultType !== String && defaultValue.constructor === String) {
defaultValue = SerializerFactory
.getSerializer(/** @type {AnyValueConstructor<*>} */(defaultType))
.deserialize(defaultValue)
.read(defaultValue)
}
}
assignAttribute(Utility.sanitize(