From 5fc84dfaa30b6b1459731d9b4a723fa024cbe4ff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:11:38 +0000 Subject: [PATCH 1/2] Initial plan From 999fdc858a1167557d41487576fc6722db81da30 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 9 Jul 2025 16:27:57 +0000 Subject: [PATCH 2/2] Fix JSDoc @import crashes in getCompletionEntryDetails Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com> --- src/services/codefixes/importFixes.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 6034c9dfc3de1..7ed189c08f747 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -1834,7 +1834,10 @@ function promoteFromTypeOnly( } function promoteImportClause(importClause: ImportClause) { - changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); + // JSDoc imports are inherently type-only and don't have a removable 'type' keyword + if (!isJSDocImportTag(importClause.parent)) { + changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); + } // Change .ts extension to .js if necessary if (!compilerOptions.allowImportingTsExtensions) { const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent);