🤖 Pick PR #59207 (Fixed crash when finding all refere...) into release-5.5 (#59209)

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
This commit is contained in:
TypeScript Bot
2024-07-16 11:25:46 -07:00
committed by GitHub
parent 326cb1f094
commit 309a93cb21
9 changed files with 787 additions and 2 deletions

View File

@@ -785,10 +785,9 @@ function getContainingModuleSymbol(importer: Importer, checker: TypeChecker): Sy
}
function getSourceFileLikeForImportDeclaration(node: ImporterOrCallExpression): SourceFileLike {
if (node.kind === SyntaxKind.CallExpression) {
if (node.kind === SyntaxKind.CallExpression || node.kind === SyntaxKind.JSDocImportTag) {
return node.getSourceFile();
}
const { parent } = node;
if (parent.kind === SyntaxKind.SourceFile) {
return parent as SourceFile;