autocomplete workaround for string literal inside template literal stopped working since v5.3.3
#57902
Labels
Cursed?
It's likely this is extremely difficult to fix without making something else much, much worse
Domain: Completion Lists
The issue relates to showing completion lists in an editor
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
π Search Terms
string literal autocomplete template
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.3.3#code/C4TwDgpgBAYg9nKBeKByA9AMwaqAfNLBdALgEsATXAgAyLnQBIBvAZ2ACcyA7AcygBkUZgF8RNAFASAxnG7soAIwCGHEvEQpUqIA
π» Code
π 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 sincev5.3.3
.The text was updated successfully, but these errors were encountered: