mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 11:37:33 +08:00
More tests and fixed
This commit is contained in:
@@ -24,6 +24,9 @@ export default class IEntity {
|
||||
/** @type {P<IEntity>} */
|
||||
static grammar = /** @type {any} */(P.failure())
|
||||
|
||||
/** @type {P<IEntity>} */
|
||||
static unknownEntityGrammar
|
||||
|
||||
/** @type {{ [key: String]: typeof IEntity }} */
|
||||
static attributes = {}
|
||||
|
||||
@@ -38,6 +41,14 @@ export default class IEntity {
|
||||
static silent = false // Do not serialize if default
|
||||
static trailing = false // Add attribute separator after the last attribute when serializing
|
||||
|
||||
#trailing = this.Self().trailing
|
||||
get trailing() {
|
||||
return this.#trailing
|
||||
}
|
||||
set trailing(value) {
|
||||
this.#trailing = value
|
||||
}
|
||||
|
||||
/** @type {String | String[]} */
|
||||
static lookbehind = ""
|
||||
|
||||
@@ -180,16 +191,6 @@ export default class IEntity {
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* @template {typeof IEntity} T
|
||||
* @this {T}
|
||||
*/
|
||||
static flagTrailing(value = true) {
|
||||
const result = this.asUniqueClass()
|
||||
result.trailing = value
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* @template {typeof IEntity} T
|
||||
* @this {InstanceType<T>}
|
||||
|
||||
Reference in New Issue
Block a user