Open
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
.