Skip to content

Commit

Permalink
fix: add var declaration to exportable types
Browse files Browse the repository at this point in the history
  • Loading branch information
zlalvani committed May 2, 2024
1 parent 96bee28 commit 2b1a96c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type {
SourceFile,
TypeAliasDeclaration,
VariableDeclaration,
VariableStatement,
} from "ts-morph";
import { Node, SyntaxKind } from "ts-morph";

Expand Down Expand Up @@ -116,14 +117,16 @@ const isExportableType = (
| ClassDeclaration
| FunctionDeclaration
| VariableDeclaration
| TypeAliasDeclaration => {
| TypeAliasDeclaration
| VariableStatement => {
return (
node.getKind() === SyntaxKind.ModuleDeclaration ||
node.getKind() === SyntaxKind.InterfaceDeclaration ||
node.getKind() === SyntaxKind.ClassDeclaration ||
node.getKind() === SyntaxKind.FunctionDeclaration ||
node.getKind() === SyntaxKind.VariableDeclaration ||
node.getKind() === SyntaxKind.TypeAliasDeclaration
node.getKind() === SyntaxKind.TypeAliasDeclaration ||
node.getKind() === SyntaxKind.VariableStatement
);
};

Expand Down

0 comments on commit 2b1a96c

Please sign in to comment.