mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Add support for goto def on external module name
This commit is contained in:
parent
a303c1eb27
commit
76bca3a766
@ -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;
|
||||
}
|
||||
|
||||
|
||||
10
tests/cases/fourslash/goToDefinitionExternamModuleName5.ts
Normal file
10
tests/cases/fourslash/goToDefinitionExternamModuleName5.ts
Normal 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');
|
||||
Loading…
x
Reference in New Issue
Block a user