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

Regression: union typed prop has wrong type in setup #3357

Closed
07akioni opened this issue Mar 4, 2021 · 2 comments · Fixed by #3119
Closed

Regression: union typed prop has wrong type in setup #3357

07akioni opened this issue Mar 4, 2021 · 2 comments · Fixed by #3119

Comments

@07akioni
Copy link
Contributor

07akioni commented Mar 4, 2021

Version

3.0.7

Reproduction link

https://codesandbox.io/s/union-prop-307-rixqq?file=/src/index.ts

image

Steps to reproduce

3.0.6(ok) https://codesandbox.io/s/union-prop-306-nxhiw?file=/src/index.ts:0-545
3.0.7(not ok) https://codesandbox.io/s/union-prop-307-rixqq?file=/src/index.ts

What is expected?

Type shouldn't union with xxx & {}

What is actually happening?

Type is broken


It possibly has the same reason of #3119

@07akioni 07akioni changed the title Regression: Union typed prop has wrong type in setup Regression: union typed prop has wrong type in setup Mar 4, 2021
@HcySunYang HcySunYang linked a pull request Mar 4, 2021 that will close this issue
@HcySunYang
Copy link
Member

I'm sure this can be fixed in #3119

@07akioni
Copy link
Contributor Author

07akioni commented Mar 7, 2021

Workaround

prop: xxx

=>

prop: {
  type: xxx,
  default: undefined
}

yyx990803 pushed a commit that referenced this issue Mar 25, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants