microsoft / microsoft/TypeScript

Adjust relative imports in TypeScript when using copy-paste

オープン
#59,841 コメント 4 件 リアクション 0 件 担当者 1 名 GitHub で見る

@navya9singh がすでに取り組んでいます。

2024年9月4日 から。

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

説明

When copying an import from a file, it would be nice if pasting it in another file would adjust the path

Copying the import from src/folder1/a.ts:

//@filename: src/folder1/a.ts
import { x } from './b';

It would be very useful if pasting it in src/folder2/a.ts would generate (note how the import path was correctly adjusted):

//@filename: src/folder2/a.ts
import { x } from '../folder1/b';

This will be very useful once we switch to relative imports starting from tomorrow.

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

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

はじめの一歩

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

評価

この issue はまだ評価されていません。

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

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