-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
Cursed?It's likely this is extremely difficult to fix without making something else much, much worseIt's likely this is extremely difficult to fix without making something else much, much worseDomain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorHelp WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
Description
π Search Terms
string literal autocomplete template
π Version & Regression Information
- This changed between versions 5.3.2 and 5.3.3
β― Playground Link
π» Code
type Foo = '/foo' | '/foo/:id' | `/foo/${string & {}}`
const bar:Foo = ''
π Actual behavior
bar
only gives /foo
as a suggestion.
π Expected behavior
bar
gives /foo
and /foo/:id
as a suggestion.
Additional information about the issue
I understand that the autocomplete is a longer ongoing issue in combination with string literals. However there was a workaround described in (among other places): #29729
This workaround (string & {}
) still works as long as it is not inside a template literal. But stopped working inside a template literal since v5.3.3
.
Metadata
Metadata
Assignees
Labels
Cursed?It's likely this is extremely difficult to fix without making something else much, much worseIt's likely this is extremely difficult to fix without making something else much, much worseDomain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorHelp WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases