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:
@@ -16,10 +16,11 @@ export default class KeyBindingEntity extends IEntity {
|
||||
bCmd: BooleanEntity,
|
||||
Key: SymbolEntity,
|
||||
}
|
||||
/** @type {P<KeyBindingEntity>} */
|
||||
static grammar = P.alt(
|
||||
SymbolEntity.grammar.map(identifier => new this({ Key: identifier })),
|
||||
Grammar.createEntityGrammar(this)
|
||||
static grammar = /** @type {P<KeyBindingEntity>} */(
|
||||
P.alt(
|
||||
SymbolEntity.grammar.map(identifier => new this({ Key: identifier })),
|
||||
Grammar.createEntityGrammar(this)
|
||||
)
|
||||
)
|
||||
|
||||
constructor(values) {
|
||||
|
||||
Reference in New Issue
Block a user