microsoft / microsoft/TypeScript
Provide a code action to replace a string with a template string
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
Suggestion
Provide a code action on a string to replace the string with a template string.
Use Cases
Often you start with a normal string and notice that it should better be a template string. See the example below. When the cursor is inside the string, there should be code action provided 'Replace with template string'
The code action replace the string with a template string

Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Nell’issue non sono indicati né un file di implementazione né un test. Inizia individuando gli entry point e i test esistenti delle code action di TypeScript, quindi usa l’esempio fornito di stringa normale come caso di input. Il lavoro è completato quando un cursore all’interno di una stringa normale offre “Replace with template string” e applica la conversione senza modificare il comportamento a runtime.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100