mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-15 09:44:49 +08:00
Better typing for grammars
This commit is contained in:
@@ -29,12 +29,13 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
)
|
||||
).map(([full, type, path]) => new this(type, path, full))
|
||||
static typeReferenceGrammar = this.typeReference.map(v => new this(v, "", v))
|
||||
/** @type {P<ObjectReferenceEntity>} */
|
||||
static grammar = P.alt(
|
||||
this.fullReferenceSerializedGrammar,
|
||||
this.fullReferenceGrammar,
|
||||
this.typeReferenceGrammar,
|
||||
).label("ObjectReferenceEntity")
|
||||
static grammar = /** @type {P<ObjectReferenceEntity>} */(
|
||||
P.alt(
|
||||
this.fullReferenceSerializedGrammar,
|
||||
this.fullReferenceGrammar,
|
||||
this.typeReferenceGrammar,
|
||||
).label("ObjectReferenceEntity")
|
||||
)
|
||||
|
||||
#type
|
||||
get type() {
|
||||
|
||||
Reference in New Issue
Block a user