mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:17:41 +08:00
Names refactoring
This commit is contained in:
@@ -11,7 +11,7 @@ import GeneralSerializer from "./GeneralSerializer"
|
||||
|
||||
/**
|
||||
* @template {AnyValue} T
|
||||
* @extends {GeneralSerializer<T>}
|
||||
* @extends {GeneralSerializer<T>}
|
||||
*/
|
||||
export default class CustomSerializer extends GeneralSerializer {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ export default class GeneralSerializer extends ISerializer {
|
||||
|
||||
/**
|
||||
* @param {(value: String, entity: T) => String} wrap
|
||||
* @param {AnyValueConstructor<T>} entityType
|
||||
* @param {AnyValueConstructor<T>} entityType
|
||||
*/
|
||||
constructor(wrap, entityType, attributePrefix, attributeSeparator, trailingSeparator, attributeValueConjunctionSign, attributeKeyPrinter) {
|
||||
wrap = wrap ?? (v => `(${v})`)
|
||||
|
||||
@@ -133,7 +133,7 @@ export default class Grammar {
|
||||
r.AttributeName
|
||||
.skip(valueSeparator)
|
||||
.chain(attributeName => {
|
||||
// Once the attribute name is known, look into entityType.attributes to get its type
|
||||
// Once the attribute name is known, look into entityType.attributes to get its type
|
||||
const attributeKey = attributeName.split(".")
|
||||
const attribute = Utility.objectGet(entityType.attributes, attributeKey)
|
||||
let attributeValueGrammar = Grammar.getGrammarForType(r, attribute, r.AttributeAnyValue)
|
||||
|
||||
Reference in New Issue
Block a user