You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't autocomplete list of strings when union string | string is present #28743
The type "foo" | "bar" | string is equivalent to the string type and now gets simplified early on. So all we see when querying the type checker for the type of x is string. So, this can't be fixed.
the issue got closed and locked so nobody could find it
I've tagged the old issue with a domain label for future use, but it predates when we used domain labels, which is why we didn't have one on it. And most old issues without activity are closed/locked.
We don't really have plugins - sans editor-wide ls plugins that wrap the entire ls. They can do anything, since they just wrap and intercept the LS, it's just not always easy.
Activity
jack-williams commentedon Nov 29, 2018
Duplicate of #12687
The union type is simplified into a normal-form via subtype reduction; hovering over
ListOrStringwill only show the supertypestring.usernamehw commentedon Nov 29, 2018
So...
new is always betterweswigham commentedon Nov 30, 2018
I've tagged the old issue with a domain label for future use, but it predates when we used domain labels, which is why we didn't have one on it. And most old issues without activity are closed/locked.
usernamehw commentedon Nov 30, 2018
Can this be implemented as a TS plugin then?
weswigham commentedon Nov 30, 2018
We don't really have plugins - sans editor-wide ls plugins that wrap the entire ls. They can do anything, since they just wrap and intercept the LS, it's just not always easy.
typescript-bot commentedon Dec 12, 2018
This issue has been marked as a duplicate and has seen no activity in the last day. It has been closed automatic house-keeping purposes.