Add support for goto def on external module name

This commit is contained in:
Mohamed Hegazy 2014-08-01 13:07:52 -07:00
parent a303c1eb27
commit 76bca3a766
2 changed files with 14 additions and 0 deletions

View File

@ -2072,6 +2072,10 @@ module ts {
var moduleType = typeChecker.getTypeOfSymbol(importSymbol);
symbol = moduleType ? moduleType.symbol : undefined;
}
// External module name in an ambient declaration
else if (node.parent.kind === SyntaxKind.ModuleDeclaration) {
symbol = typeChecker.getSymbolOfNode(node.parent);
}
break;
}

View File

@ -0,0 +1,10 @@
/// <reference path='fourslash.ts'/>
// @Filename: a.ts
/////*2*/declare module "external/*1*/" {
//// class Foo { }
////}
goTo.marker('1');
goTo.definition();
verify.caretAtMarker('2');