@@ -33,7 +33,6 @@ export default function tag(parser) {
33
33
parser . allow_whitespace ( ) ;
34
34
parser . eat ( '}' , true ) ;
35
35
36
- /** @type {ReturnType<typeof parser.append<AST.ExpressionTag>> } */
37
36
parser . append ( {
38
37
type : 'ExpressionTag' ,
39
38
start,
@@ -53,7 +52,7 @@ function open(parser) {
53
52
if ( parser . eat ( 'if' ) ) {
54
53
parser . require_whitespace ( ) ;
55
54
56
- /** @type {ReturnType<typeof parser.append< AST.IfBlock>> } */
55
+ /** @type {AST.IfBlock } */
57
56
const block = parser . append ( {
58
57
type : 'IfBlock' ,
59
58
elseif : false ,
@@ -174,7 +173,7 @@ function open(parser) {
174
173
175
174
parser . eat ( '}' , true ) ;
176
175
177
- /** @type {ReturnType<typeof parser.append< AST.EachBlock>> } */
176
+ /** @type {AST.EachBlock } */
178
177
const block = parser . append ( {
179
178
type : 'EachBlock' ,
180
179
start,
@@ -198,7 +197,7 @@ function open(parser) {
198
197
const expression = read_expression ( parser ) ;
199
198
parser . allow_whitespace ( ) ;
200
199
201
- /** @type {ReturnType<typeof parser.append< AST.AwaitBlock>> } */
200
+ /** @type {AST.AwaitBlock } */
202
201
const block = parser . append ( {
203
202
type : 'AwaitBlock' ,
204
203
start,
@@ -252,7 +251,7 @@ function open(parser) {
252
251
253
252
parser . eat ( '}' , true ) ;
254
253
255
- /** @type {ReturnType<typeof parser.append< AST.KeyBlock>> } */
254
+ /** @type {AST.KeyBlock } */
256
255
const block = parser . append ( {
257
256
type : 'KeyBlock' ,
258
257
start,
@@ -303,7 +302,7 @@ function open(parser) {
303
302
parser . allow_whitespace ( ) ;
304
303
parser . eat ( '}' , true ) ;
305
304
306
- /** @type {ReturnType<typeof parser.append< AST.SnippetBlock>> } */
305
+ /** @type {AST.SnippetBlock } */
307
306
const block = parser . append ( {
308
307
type : 'SnippetBlock' ,
309
308
start,
@@ -355,7 +354,7 @@ function next(parser) {
355
354
let elseif_start = start - 1 ;
356
355
while ( parser . template [ elseif_start ] !== '{' ) elseif_start -= 1 ;
357
356
358
- /** @type {ReturnType<typeof parser.append< AST.IfBlock>> } */
357
+ /** @type {AST.IfBlock } */
359
358
const child = parser . append ( {
360
359
start : elseif_start ,
361
360
end : - 1 ,
@@ -499,7 +498,6 @@ function special(parser) {
499
498
parser . allow_whitespace ( ) ;
500
499
parser . eat ( '}' , true ) ;
501
500
502
- /** @type {ReturnType<typeof parser.append<AST.HtmlTag>> } */
503
501
parser . append ( {
504
502
type : 'HtmlTag' ,
505
503
start,
@@ -537,7 +535,6 @@ function special(parser) {
537
535
parser . eat ( '}' , true ) ;
538
536
}
539
537
540
- /** @type {ReturnType<typeof parser.append<AST.DebugTag>> } */
541
538
parser . append ( {
542
539
type : 'DebugTag' ,
543
540
start,
@@ -570,7 +567,6 @@ function special(parser) {
570
567
571
568
parser . eat ( '}' , true ) ;
572
569
573
- /** @type {ReturnType<typeof parser.append<AST.ConstTag>> } */
574
570
parser . append ( {
575
571
type : 'ConstTag' ,
576
572
start,
@@ -601,15 +597,15 @@ function special(parser) {
601
597
parser . allow_whitespace ( ) ;
602
598
parser . eat ( '}' , true ) ;
603
599
604
- /** @type {ReturnType<typeof parser.append<AST.RenderTag>> } */
605
600
parser . append ( {
606
601
type : 'RenderTag' ,
607
602
start,
608
603
end : parser . index ,
609
- expression : expression ,
604
+ expression : /** @type { AST.RenderTag[' expression'] } */ ( expression ) ,
610
605
metadata : {
611
606
dynamic : false ,
612
- args_with_call_expression : new Set ( )
607
+ args_with_call_expression : new Set ( ) ,
608
+ path : [ ]
613
609
}
614
610
} ) ;
615
611
}
0 commit comments