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

[vue-component-meta] fix: parse defineProps in script setup with option #1665

Merged
merged 2 commits into from Aug 2, 2022
Merged

[vue-component-meta] fix: parse defineProps in script setup with option #1665

merged 2 commits into from Aug 2, 2022

Conversation

stafyniaksacha
Copy link
Collaborator

@stafyniaksacha stafyniaksacha commented Aug 2, 2022

This allows to parse defineProps in <script setup>

<script setup>
defineProps({
  /**
   * Required foo property
   */
  foo: {
    type: String,
    required: true,
  },
  /**
   * The hello property.
   *
   * @since v1.0.0
   */
  hello: {
    type: String,
    default: 'Hello'
  },
  numberOrStringProp: {
    type: [Number, String],
    default: 42
  },
  arrayProps: {
    type: Array,
    default: () => [42, 43, 44]
  }
})
</script>

chore:

  • use same checker instance in tests (may we want to enable schema and printer by default?)

@stafyniaksacha stafyniaksacha changed the title fix: parse defineProps in script setup with option [vue-component-meta] fix: parse defineProps in script setup with option Aug 2, 2022
@johnsoncodehk johnsoncodehk merged commit 7251b5c into vuejs:master Aug 2, 2022
@stafyniaksacha stafyniaksacha deleted the fix/props-js-setup branch August 2, 2022 16:39
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

Successfully merging this pull request may close these issues.

None yet

2 participants