microsoft / microsoft/TypeScript

Adjust relative imports in TypeScript when using copy-paste

Aperta
#59,841 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@navya9singh ci sta già lavorando.

Dal 4/9/2024.

Experience Enhancement Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.4k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.