Template literal type params and returns break method autocompletions #48215
Labels
Bug
A bug in TypeScript
Domain: Completion Lists
The issue relates to showing completion lists in an editor
Fix Available
A PR has been opened for this issue
Milestone
Bug Report
🔎 Search Terms
method autocomplete template literal type
🕗 Version & Regression Information
This behaviour exists in both 4.6.2 and 4.7.0-dev.20220310. I did not test earlier versions since method autocompletions are still fairly new.
⏯ Playground Link
Method autocompletions don't work in the playground, so you'll have to copy this over to VSCode to test:
Playground link with relevant code
💻 Code
This is four different examples of things that work/don't work with comments so it's a bit longer than 30 lines. I wanted to be thorough
🙁 Actual/🙂 Expected behavior
See code above. Method autocompletions don't work when their types contain template literals.
Note
I'm not sure whether the issue is due to VSCode failing to render autocompletions that contain literal types, or TypeScript failing to provide autocompletions for them. I apologise if I'm reporting this to the wrong tracker — hopefully I guessed right.
The text was updated successfully, but these errors were encountered: