Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(flow.ts): add importKind field to ImportSpecifier #826

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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