Skip to content

Commit

Permalink
fix: remove TSDeclareFunction from ExportDefaultDeclaration (#14591)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed May 26, 2022
1 parent 8967ccb commit 5f9c532
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions packages/babel-types/src/ast-types/generated/index.ts
Expand Up @@ -811,11 +811,7 @@ export interface ExportAllDeclaration extends BaseNode {

export interface ExportDefaultDeclaration extends BaseNode {
type: "ExportDefaultDeclaration";
declaration:
| FunctionDeclaration
| TSDeclareFunction
| ClassDeclaration
| Expression;
declaration: FunctionDeclaration | ClassDeclaration | Expression;
exportKind?: "value" | null;
}

Expand Down
6 changes: 1 addition & 5 deletions packages/babel-types/src/builders/generated/index.ts
Expand Up @@ -634,11 +634,7 @@ export function exportAllDeclaration(
});
}
export function exportDefaultDeclaration(
declaration:
| t.FunctionDeclaration
| t.TSDeclareFunction
| t.ClassDeclaration
| t.Expression,
declaration: t.FunctionDeclaration | t.ClassDeclaration | t.Expression,
): t.ExportDefaultDeclaration {
return validateNode<t.ExportDefaultDeclaration>({
type: "ExportDefaultDeclaration",
Expand Down
1 change: 0 additions & 1 deletion packages/babel-types/src/definitions/core.ts
Expand Up @@ -1490,7 +1490,6 @@ defineType("ExportDefaultDeclaration", {
declaration: {
validate: assertNodeType(
"FunctionDeclaration",
"TSDeclareFunction",
"ClassDeclaration",
"Expression",
),
Expand Down

0 comments on commit 5f9c532

Please sign in to comment.