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

Prop validation support real PropType<Interface> #2343

Open
1 task done
yoyo930021 opened this issue Sep 28, 2020 · 0 comments
Open
1 task done

Prop validation support real PropType<Interface> #2343

yoyo930021 opened this issue Sep 28, 2020 · 0 comments

Comments

@yoyo930021
Copy link
Member

yoyo930021 commented Sep 28, 2020

  • I have searched through existing issues

Feature Request

Now, we can't support like:

import Vue, { PropType } from 'vue'

type Bar = 'cac' | 'oao'

interface Foo {
  c: Bar
}

export default Vue.extends({
  props: {
    foo: { type: Object as PropType<Foo> },
    bar: { type: String as PropType<Bar> }
  }
})

I think we can try to analysis type recursive.
convert Foo to { c: 'cac' | 'oao' }.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant