* fix 39453

* add restriction.

* add tests

* comment.

* fix as suggestion.
This commit is contained in:
Song
2020-07-22 00:40:25 +08:00
committed by GitHub
parent 56865f722d
commit d897646a4a
3 changed files with 127 additions and 0 deletions

View File

@@ -249,6 +249,10 @@ namespace ts.CallHierarchy {
}
return undefined;
}
// #39453
if (isVariableDeclaration(location) && location.initializer && isConstNamedExpression(location.initializer)) {
return location.initializer;
}
if (!followingSymbol) {
let symbol = typeChecker.getSymbolAtLocation(location);
if (symbol) {