Skip to content

Commit 239dde8

Browse files
author
Andy
authored
Fix cast: location may be a SourceFile (#24498)
1 parent cead866 commit 239dde8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ namespace ts {
12911291
isInExternalModule = true;
12921292
// falls through
12931293
case SyntaxKind.ModuleDeclaration:
1294-
const moduleExports = getSymbolOfNode(location as ModuleDeclaration).exports!;
1294+
const moduleExports = getSymbolOfNode(location as SourceFile | ModuleDeclaration).exports!;
12951295
if (location.kind === SyntaxKind.SourceFile || isAmbientModule(location)) {
12961296

12971297
// It's an external module. First see if the module has an export default and if the local

0 commit comments

Comments
 (0)