mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 03:27:32 +08:00
Better typing for grammars
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import P from "parsernostrum"
|
||||
import Grammar from "../serialization/Grammar.js"
|
||||
import IEntity from "./IEntity.js"
|
||||
import NumberEntity from "./NumberEntity.js"
|
||||
@@ -11,7 +12,9 @@ export default class Vector4DEntity extends IEntity {
|
||||
Z: NumberEntity.withDefault(),
|
||||
W: NumberEntity.withDefault(),
|
||||
}
|
||||
static grammar = Grammar.createEntityGrammar(this, Grammar.commaSeparation, true).label("Vector4DEntity")
|
||||
static grammar = /** @type {P<Vector4DEntity>} */(
|
||||
Grammar.createEntityGrammar(this, Grammar.commaSeparation, true).label("Vector4DEntity")
|
||||
)
|
||||
|
||||
constructor(values) {
|
||||
super(values)
|
||||
|
||||
Reference in New Issue
Block a user