mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:28:17 +08:00
Fix single line doc comments
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
import GeneralSerializer from "./GeneralSerializer"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
*/
|
||||
/** @typedef {import("../entity/IEntity").default} IEntity */
|
||||
|
||||
/**
|
||||
* @template {IEntity | Boolean | Number | String} T
|
||||
*/
|
||||
/** @template {IEntity | Boolean | Number | String} T */
|
||||
export default class CustomSerializer extends GeneralSerializer {
|
||||
|
||||
#objectWriter
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
import Grammar from "./Grammar"
|
||||
import ISerializer from "./ISerializer"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
*/
|
||||
/** @typedef {import("../entity/IEntity").default} IEntity */
|
||||
|
||||
/**
|
||||
* @template {IEntity} T
|
||||
*/
|
||||
/** @template {IEntity} T */
|
||||
export default class GeneralSerializer extends ISerializer {
|
||||
|
||||
/**
|
||||
* @param {new () => T} entityType
|
||||
*/
|
||||
/** @param {new () => T} entityType */
|
||||
constructor(wrap, entityType, prefix, separator, trailingSeparator, attributeValueConjunctionSign, attributeKeyPrinter) {
|
||||
wrap = wrap ?? (v => `(${v})`)
|
||||
super(entityType, prefix, separator, trailingSeparator, attributeValueConjunctionSign, attributeKeyPrinter)
|
||||
|
||||
@@ -17,9 +17,7 @@ import TypeInitialization from "../entity/TypeInitialization"
|
||||
import Utility from "../Utility"
|
||||
import VectorEntity from "../entity/VectorEntity"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
*/
|
||||
/** @typedef {import("../entity/IEntity").default} IEntity */
|
||||
|
||||
let P = Parsimmon
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ import SerializerFactory from "./SerializerFactory"
|
||||
import TypeInitialization from "../entity/TypeInitialization"
|
||||
import Utility from "../Utility"
|
||||
|
||||
/**
|
||||
* @template {IEntity} T
|
||||
*/
|
||||
/** @template {IEntity} T */
|
||||
export default class ISerializer {
|
||||
|
||||
static grammar = Parsimmon.createLanguage(new Grammar())
|
||||
|
||||
@@ -20,9 +20,7 @@ export default class ObjectSerializer extends ISerializer {
|
||||
return super.showProperty(entity, object, attributeKey, attributeValue)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} value
|
||||
*/
|
||||
/** @param {String} value */
|
||||
read(value) {
|
||||
const parseResult = ISerializer.grammar.Object.parse(value)
|
||||
if (!parseResult.status) {
|
||||
@@ -31,9 +29,7 @@ export default class ObjectSerializer extends ISerializer {
|
||||
return parseResult.value
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} value
|
||||
*/
|
||||
/** @param {String} value */
|
||||
readMultiple(value) {
|
||||
const parseResult = ISerializer.grammar.MultipleObject.parse(value)
|
||||
if (!parseResult.status) {
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
import Utility from "../Utility"
|
||||
import GeneralSerializer from "./GeneralSerializer"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
*/
|
||||
/** @typedef {import("../entity/IEntity").default} IEntity */
|
||||
|
||||
/**
|
||||
* @template {IEntity} T
|
||||
*/
|
||||
/** @template {IEntity} T */
|
||||
export default class ToStringSerializer extends GeneralSerializer {
|
||||
|
||||
/**
|
||||
* @param {new () => T} entityType
|
||||
*/
|
||||
/** @param {new () => T} entityType */
|
||||
constructor(entityType) {
|
||||
super(undefined, entityType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user