mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Fix cast: location may be a SourceFile (#24498)
This commit is contained in:
@@ -1291,7 +1291,7 @@ namespace ts {
|
||||
isInExternalModule = true;
|
||||
// falls through
|
||||
case SyntaxKind.ModuleDeclaration:
|
||||
const moduleExports = getSymbolOfNode(location as ModuleDeclaration).exports!;
|
||||
const moduleExports = getSymbolOfNode(location as SourceFile | ModuleDeclaration).exports!;
|
||||
if (location.kind === SyntaxKind.SourceFile || isAmbientModule(location)) {
|
||||
|
||||
// It's an external module. First see if the module has an export default and if the local
|
||||
|
||||
Reference in New Issue
Block a user