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

Sub-Component type check: optional fields are mis interpolated when kebab-cased #2345

Closed
3 tasks done
AlexandreBonaventure opened this issue Sep 29, 2020 · 1 comment
Closed
3 tasks done

Comments

@AlexandreBonaventure
Copy link
Contributor

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS
  • Vetur version: 0.28.0
  • VS Code version: 1.49.1

Problem

For a given component defined like such :

defineComponent({
  props: {
    iconPosition: {
      type: String as () => 'left'|'right',
      default: 'left',
      required: false,
    },
  },
})

What's happening ?

for icon-position typings are interpreted as 'icon-position?' : any

What's expected ?

for icon-position typings should put the question mark outside the string key like that: 'icon-position'? : any

Reproducible Case

Coming soon I promise

@yoyo930021
Copy link
Member

Duplicate of #2314

@yoyo930021 yoyo930021 marked this as a duplicate of #2314 Sep 30, 2020
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

2 participants