Skip to content

Commit 329dfb7

Browse files
committed
fix(flow.ts): add importKind field to ImportSpecifier
1 parent f1c8ff5 commit 329dfb7

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

def/flow.ts

+3
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ export default function (fork: Fork) {
404404

405405
def("ImportDeclaration")
406406
.field("importKind", or("value", "type", "typeof"), () => "value");
407+
408+
def("ImportSpecifier")
409+
.field("importKind", or("value", "type", "typeof"), defaults["null"]);
407410

408411
def("FlowPredicate").bases("Flow");
409412

gen/builders.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,8 @@ export interface NewExpressionBuilder {
580580
callee: K.ExpressionKind,
581581
comments?: K.CommentKind[] | null,
582582
loc?: K.SourceLocationKind | null,
583-
typeArguments?: null | K.TypeParameterInstantiationKind
583+
typeArguments?: null | K.TypeParameterInstantiationKind,
584+
typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null
584585
}
585586
): namedTypes.NewExpression;
586587
}
@@ -597,7 +598,8 @@ export interface CallExpressionBuilder {
597598
comments?: K.CommentKind[] | null,
598599
loc?: K.SourceLocationKind | null,
599600
optional?: boolean,
600-
typeArguments?: null | K.TypeParameterInstantiationKind
601+
typeArguments?: null | K.TypeParameterInstantiationKind,
602+
typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null
601603
}
602604
): namedTypes.CallExpression;
603605
}
@@ -1194,7 +1196,8 @@ export interface OptionalCallExpressionBuilder {
11941196
comments?: K.CommentKind[] | null,
11951197
loc?: K.SourceLocationKind | null,
11961198
optional?: boolean,
1197-
typeArguments?: null | K.TypeParameterInstantiationKind
1199+
typeArguments?: null | K.TypeParameterInstantiationKind,
1200+
typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null
11981201
}
11991202
): namedTypes.OptionalCallExpression;
12001203
}

gen/namedTypes.ts

+2
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,15 @@ export namespace namedTypes {
298298
type: "NewExpression";
299299
callee: K.ExpressionKind;
300300
arguments: (K.ExpressionKind | K.SpreadElementKind)[];
301+
typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null;
301302
typeArguments?: null | K.TypeParameterInstantiationKind;
302303
}
303304

304305
export interface CallExpression extends Omit<Expression, "type">, Omit<ChainElement, "type"> {
305306
type: "CallExpression";
306307
callee: K.ExpressionKind;
307308
arguments: (K.ExpressionKind | K.SpreadElementKind)[];
309+
typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null;
308310
typeArguments?: null | K.TypeParameterInstantiationKind;
309311
}
310312

0 commit comments

Comments
 (0)