Skip to content

Commit

Permalink
fix(flow.ts): add importKind field to ImportSpecifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Aug 31, 2022
1 parent f1c8ff5 commit 329dfb7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions def/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
9 changes: 6 additions & 3 deletions gen/builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions gen/namedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,15 @@ export namespace namedTypes {
type: "NewExpression";
callee: K.ExpressionKind;
arguments: (K.ExpressionKind | K.SpreadElementKind)[];
typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null;
typeArguments?: null | K.TypeParameterInstantiationKind;
}

export interface CallExpression extends Omit<Expression, "type">, Omit<ChainElement, "type"> {
type: "CallExpression";
callee: K.ExpressionKind;
arguments: (K.ExpressionKind | K.SpreadElementKind)[];
typeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null;
typeArguments?: null | K.TypeParameterInstantiationKind;
}

Expand Down

0 comments on commit 329dfb7

Please sign in to comment.