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
From the type system's perspective, "red" | "green" | "blue" | string is a fancy way of writing string. The literals are lost. We don't have any mechanism for "A type plus some associated suggestions" nor plans to add one.
But can we make this happen in the future?
It's only a Feature Request and maybe someone in the open source world can bring us this Feature.
It wont break anything but improve VS Code.
When we define a type like this, we get full autosuggestion support:
But if we define a type with a fallback to
string
, we get nothing intelligent:The text was updated successfully, but these errors were encountered: