-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: 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 this
Milestone
Description
Bug Report
When creating a union between a standard object type and a template string literal which includes generic values (e.g. `${number}/${number}`) causes the intellisense to suggest all functions in the String object, despite not actually being valid suggestions.
🔎 Search Terms
template string literal union object intellisense
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about intellisense
- I was unable to test this on prior versions because I cannot install them easily
⏯ Playground Link
Playground link with relevant code
💻 Code
type WorkingIntellisense = {
key: string;
} | `string literal`;
const workingIntellisense: WorkingIntellisense = {
key: 'value',
};
type BrokenIntellisense = {
key: string;
} | `string literal ${string}`;
const brokenIntellisense: BrokenIntellisense = {
key: 'value',
};🙁 Actual behavior
The intellisense suggestion shows string functions.

🙂 Expected behavior
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: 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 this
