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

"Date" is inferred as string when specified as one of multiple possible prop types #4517

Closed
HusamElbashir opened this issue Sep 4, 2021 · 1 comment · Fixed by #4518
Closed

Comments

@HusamElbashir
Copy link
Contributor

Version

3.2.8

Reproduction link

codesandbox.io

Steps to reproduce

Define props

{
  props: {
    date: [Date, Number]
  },
  setup(props) {
    // type is string | number
    props.date 
  }

What is expected?

props.date should be of type Date | number

What is actually happening?

props.date is of type string | number


This is likely related to #2668

@webfansplz
Copy link
Member

i think have the same problem with defineProps, so I mentioned another PR to fixed it

@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants