Find tagless JSDoc as preceding token (#39912)

This commit is contained in:
Andrew Branch
2020-08-05 10:09:45 -07:00
committed by GitHub
parent 2ebdf9fdce
commit 7f4e1b699a
2 changed files with 21 additions and 0 deletions

View File

@@ -1217,6 +1217,10 @@ namespace ts {
}
const children = n.getChildren(sourceFile);
if (children.length === 0) {
return n;
}
const candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length, sourceFile);
return candidate && findRightmostToken(candidate, sourceFile);
}