microsoft / microsoft/TypeScript
Autocompletion of Template Literal Types with unresolved types.
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
Extension: Typescript Language Features
Feature: Autocompletion of Template Literal Types with unresolved types.
Hi,
Currently the autocompletion for template literal types stops working as soon as an ambiguous type is used in the template, like number or string.
My idea is, that instead of proposing nothing at all, the autocompletion feature can be extended to propose a snippet with a template literal string and tabstops for the parameters or alternatively a normal string. String unions could be replaced with choices. The end result after selecting the completion would look like something like that:
This could be for example helpful with APIs that typed their Ressource pathes using parametrized template literals.
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
Beginne mit der TypeScript Language Features-Erweiterung und reproduziere die im Bericht beschriebenen Vervollständigungsfälle für Template-Literals. Vergleiche das Verhalten bei nicht aufgelösten Typen und kläre anschließend, ob die Vervollständigung ein Snippet mit Tabstopps, einen normalen String oder Union-Auswahlmöglichkeiten erzeugen sollte; abgeschlossen ist die Aufgabe, wenn die ausgewählte Vervollständigung sich in diesen Fällen konsistent verhält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- developer-experience
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100