mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Fix cast: location may be a SourceFile (#24498)
This commit is contained in:
parent
cead8667b2
commit
239dde8ff1
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user