Fix bug when name resolution fails in a @typedef: Don't set lastLocation (#24585)

* Fix bug when name resolution fails in a @typedef: Don't set `lastLocation`

* Add noEmit to test
This commit is contained in:
Andy
2018-06-01 16:49:54 -07:00
committed by GitHub
parent a58054df99
commit 9be846e1f2
5 changed files with 54 additions and 3 deletions

View File

@@ -1458,9 +1458,8 @@ namespace ts {
case SyntaxKind.JSDocTypedefTag:
case SyntaxKind.JSDocCallbackTag:
// js type aliases do not resolve names from their host, so skip past it
lastLocation = location;
location = getJSDocHost(location).parent;
continue;
location = getJSDocHost(location);
break;
}
if (isSelfReferenceLocation(location)) {
lastSelfReferenceLocation = location;