Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discriminated unions doesn't work when the discriminator is wrapped in a Ref #3715

Closed
UfukUstali opened this issue Nov 7, 2023 · 1 comment

Comments

@UfukUstali
Copy link

Why this doesn't work?

Typescript (currently) doesn't look any further than the direct decendants of an object to discriminate a union. (Click here for a more through explanation.)
As a consequence of this when the discriminating factor is a Ref (which happens very commonly) the discriminated union doesn't work.

The above mentioned issue is open since 2017 and this is still the case. In light of this fact I would like to ask if it would be possible to implement a vue specific feature in volar where it would look inside of direct decendant Refs along with direct decendants for a discriminating factor.

@davidmatter
Copy link
Collaborator

Please check if this issue has been resolved in version 2.x. If not, feel free to create a new one.

@davidmatter davidmatter closed this as not planned Won't fix, can't repro, duplicate, stale Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants