babel-plugin-jsx: [BUG] v-model when props has attr `required: true`, typescript report errors.

🐛 Bug description

v-model when props has attr required: true, typescript report errors. link: #151 image

🏞 Desired result

🚑 Other information

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 22 (7 by maintainers)

Most upvoted comments

I also face the same problem, how should I solve it @chaozwn @sxzz @funny-family @zhiyuanzmj @rcjiang

https://vue-macros.dev/guide/bundler-integration.html

You can install @vue-macros/volar plugin to resolve it

pnpm add @vue-macros/volar

Usage

// tsconfig.json
{
  "vueCompilerOptions": {
    "plugins": [
      // ...
      "@vue-macros/volar/jsx-directive"
    ]
  }
}