From 676e3bc8728afa339cc8b81814fe581814bfb279 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 5 May 2016 17:53:19 -0700 Subject: [PATCH] getSymbolAtLocation now returns symbol for external modules --- src/compiler/checker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 311f60792e..7b3678d86c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16587,6 +16587,9 @@ namespace ts { } function getSymbolAtLocation(node: Node) { + if (node.kind === SyntaxKind.SourceFile) { + return isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; + } if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further return undefined;