Skip to content

Commit

Permalink
Update getIsIsolatedModules.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
StringKe authored and imjuni committed Oct 23, 2023
1 parent 27f4a37 commit 8ec2ea1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/compilers/getIsIsolatedModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export default function getIsIsolatedModules(
return true;
}

// Identifier
if (exportedDeclarationNode.asKind(tsm.SyntaxKind.Identifier) != null) {
return false;
}

// SourceFile(like Vue.js components)
// eg.
//
Expand All @@ -77,11 +82,6 @@ export default function getIsIsolatedModules(
return false;
}

// Identifier
if (exportedDeclarationNode.getKind() === tsm.SyntaxKind.Identifier) {
return true;
}

throw new Error(
`Cannot support type: (${exportedDeclarationNode.getKind()}) ${exportedDeclarationNode.getText()}`,
);
Expand Down

0 comments on commit 8ec2ea1

Please sign in to comment.