ts1484 Quick fix will dupe comments

オープン
#64,272 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
tooling

調査の方向性

index.ts と foo.ts のスニペットで問題を再現し、verbatimModuleSyntax を有効にして、import type を使用するために ts1484 クイック修正を呼び出します。まず、その診断に対するクイック修正の動作を追跡します。上、左、または右のコメントを複製せずに import が変更されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

🔎 Search Terms

"quickfix comment" "dupe comment"

🕗 Version & Regression Information
  • This changed between versions 6.0.0-dev.20260416 and 6.0.3 of vscode extensions.
⏯ Playground Link

No response

💻 Code

index.ts:

// upper comment
/*left comment*/ import { foo } from "./foo"; // right comment
// lower comment

foo.ts:

export type foo = "foo":

and enable verbatimModuleSyntax.
then run quick fix use 'import type'.

🙁 Actual behavior

index.ts:

// upper comment
/*left comment*/ // upper comment
/*left comment*/ import type { foo } from "./foo"; // right comment
 // right comment
// lower comment

upper, left and right comment is duped.

🙂 Expected behavior
// upper comment
/*left comment*/ import type { foo } from "./foo"; // right comment
// lower comment
Additional information about the issue

ts1484 error: 'foo' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 15時間
マージ済み PR(30日)
106

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TypeScript のほかの issue

microsoft/TypeScript の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。