fix: "hash" is optional in AST
This commit is contained in:
Vendored
+23
-8
@@ -278,7 +278,6 @@ declare namespace hbs {
|
|||||||
|
|
||||||
interface Program extends Node {
|
interface Program extends Node {
|
||||||
body: Statement[];
|
body: Statement[];
|
||||||
blockParams: string[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Statement extends Node {}
|
interface Statement extends Node {}
|
||||||
@@ -287,18 +286,25 @@ declare namespace hbs {
|
|||||||
type: 'MustacheStatement';
|
type: 'MustacheStatement';
|
||||||
path: PathExpression | Literal;
|
path: PathExpression | Literal;
|
||||||
params: Expression[];
|
params: Expression[];
|
||||||
hash: Hash;
|
hash?: Hash;
|
||||||
escaped: boolean;
|
escaped: boolean;
|
||||||
strip: StripFlags;
|
strip: StripFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Decorator extends MustacheStatement { }
|
interface Decorator extends Statement {
|
||||||
|
type: 'Decorator';
|
||||||
|
path: PathExpression | Literal;
|
||||||
|
params: Expression[];
|
||||||
|
hash?: Hash;
|
||||||
|
escaped: boolean;
|
||||||
|
strip: StripFlags;
|
||||||
|
}
|
||||||
|
|
||||||
interface BlockStatement extends Statement {
|
interface BlockStatement extends Statement {
|
||||||
type: 'BlockStatement';
|
type: 'BlockStatement';
|
||||||
path: PathExpression;
|
path: PathExpression;
|
||||||
params: Expression[];
|
params: Expression[];
|
||||||
hash: Hash;
|
hash?: Hash;
|
||||||
program: Program;
|
program: Program;
|
||||||
inverse: Program;
|
inverse: Program;
|
||||||
openStrip: StripFlags;
|
openStrip: StripFlags;
|
||||||
@@ -306,13 +312,21 @@ declare namespace hbs {
|
|||||||
closeStrip: StripFlags;
|
closeStrip: StripFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DecoratorBlock extends BlockStatement { }
|
interface DecoratorBlock extends Statement {
|
||||||
|
type: 'DecoratorBlock';
|
||||||
|
path: PathExpression;
|
||||||
|
params: Expression[];
|
||||||
|
hash?: Hash;
|
||||||
|
program: Program;
|
||||||
|
openStrip: StripFlags;
|
||||||
|
closeStrip: StripFlags;
|
||||||
|
}
|
||||||
|
|
||||||
interface PartialStatement extends Statement {
|
interface PartialStatement extends Statement {
|
||||||
type: 'PartialStatement';
|
type: 'PartialStatement';
|
||||||
name: PathExpression | SubExpression;
|
name: PathExpression | SubExpression;
|
||||||
params: Expression[];
|
params: Expression[];
|
||||||
hash: Hash;
|
hash?: Hash;
|
||||||
indent: string;
|
indent: string;
|
||||||
strip: StripFlags;
|
strip: StripFlags;
|
||||||
}
|
}
|
||||||
@@ -321,7 +335,7 @@ declare namespace hbs {
|
|||||||
type: 'PartialBlockStatement';
|
type: 'PartialBlockStatement';
|
||||||
name: PathExpression | SubExpression;
|
name: PathExpression | SubExpression;
|
||||||
params: Expression[];
|
params: Expression[];
|
||||||
hash: Hash;
|
hash?: Hash;
|
||||||
program: Program;
|
program: Program;
|
||||||
openStrip: StripFlags;
|
openStrip: StripFlags;
|
||||||
closeStrip: StripFlags;
|
closeStrip: StripFlags;
|
||||||
@@ -345,7 +359,7 @@ declare namespace hbs {
|
|||||||
type: 'SubExpression';
|
type: 'SubExpression';
|
||||||
path: PathExpression;
|
path: PathExpression;
|
||||||
params: Expression[];
|
params: Expression[];
|
||||||
hash: Hash;
|
hash?: Hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface PathExpression extends Expression {
|
interface PathExpression extends Expression {
|
||||||
@@ -357,6 +371,7 @@ declare namespace hbs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface Literal extends Expression {}
|
interface Literal extends Expression {}
|
||||||
|
|
||||||
interface StringLiteral extends Literal {
|
interface StringLiteral extends Literal {
|
||||||
type: 'StringLiteral';
|
type: 'StringLiteral';
|
||||||
value: string;
|
value: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user