From 329dfb76d54d7d900212d8c5383362c47141f43c Mon Sep 17 00:00:00 2001 From: Andy Edwards Date: Tue, 30 Aug 2022 09:53:57 -0500 Subject: [PATCH] fix(flow.ts): add importKind field to ImportSpecifier --- def/flow.ts | 3 +++ gen/builders.ts | 9 ++++++--- gen/namedTypes.ts | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/def/flow.ts b/def/flow.ts index 7df97cf8..c6631c43 100644 --- a/def/flow.ts +++ b/def/flow.ts @@ -404,6 +404,9 @@ export default function (fork: Fork) { def("ImportDeclaration") .field("importKind", or("value", "type", "typeof"), () => "value"); + + def("ImportSpecifier") + .field("importKind", or("value", "type", "typeof"), defaults["null"]); def("FlowPredicate").bases("Flow"); diff --git a/gen/builders.ts b/gen/builders.ts index 3f5254ba..3395a647 100644 --- a/gen/builders.ts +++ b/gen/builders.ts @@ -580,7 +580,8 @@ export interface NewExpressionBuilder { callee: K.ExpressionKind, comments?: K.CommentKind[] | null, loc?: K.SourceLocationKind | null, - typeArguments?: null | K.TypeParameterInstantiationKind + typeArguments?: null | K.TypeParameterInstantiationKind, + typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null } ): namedTypes.NewExpression; } @@ -597,7 +598,8 @@ export interface CallExpressionBuilder { comments?: K.CommentKind[] | null, loc?: K.SourceLocationKind | null, optional?: boolean, - typeArguments?: null | K.TypeParameterInstantiationKind + typeArguments?: null | K.TypeParameterInstantiationKind, + typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null } ): namedTypes.CallExpression; } @@ -1194,7 +1196,8 @@ export interface OptionalCallExpressionBuilder { comments?: K.CommentKind[] | null, loc?: K.SourceLocationKind | null, optional?: boolean, - typeArguments?: null | K.TypeParameterInstantiationKind + typeArguments?: null | K.TypeParameterInstantiationKind, + typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null } ): namedTypes.OptionalCallExpression; } diff --git a/gen/namedTypes.ts b/gen/namedTypes.ts index a520ef45..62252d57 100644 --- a/gen/namedTypes.ts +++ b/gen/namedTypes.ts @@ -298,6 +298,7 @@ export namespace namedTypes { type: "NewExpression"; callee: K.ExpressionKind; arguments: (K.ExpressionKind | K.SpreadElementKind)[]; + typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null; typeArguments?: null | K.TypeParameterInstantiationKind; } @@ -305,6 +306,7 @@ export namespace namedTypes { type: "CallExpression"; callee: K.ExpressionKind; arguments: (K.ExpressionKind | K.SpreadElementKind)[]; + typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null; typeArguments?: null | K.TypeParameterInstantiationKind; }