Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Autocompletion of Template Literal Types with unresolved types. #61217

Open
tipptop3d opened this issue Feb 17, 2025 · 0 comments
Open

Autocompletion of Template Literal Types with unresolved types. #61217

tipptop3d opened this issue Feb 17, 2025 · 0 comments
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript

Comments

@tipptop3d
Copy link

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.

Image

Image

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:

Image

This could be for example helpful with APIs that typed their Ressource pathes using parametrized template literals.

@mjbvz mjbvz transferred this issue from microsoft/vscode Feb 18, 2025
@mjbvz mjbvz removed their assignment Feb 18, 2025
@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature labels Feb 25, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants