microsoft / microsoft/TypeScript
Provide a code action to replace a string with a template string
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
In der Issue wird keine Implementierungsdatei und kein Test genannt. Beginne damit, die vorhandenen Code-Action-Einstiegspunkte und Tests von TypeScript zu finden, und verwende dann das bereitgestellte Beispiel für einen normalen String als Eingabefall. Als erfüllt gilt die Aufgabe, wenn eine Cursorposition innerhalb eines normalen Strings „Replace with template string“ anbietet und die Konvertierung anwendet, ohne das Laufzeitverhalten zu ändern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100