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

Type errors on vee-validate components after Vue 3.5 update #4866

Open
1 of 5 tasks
leondeklerkfenetre opened this issue Sep 23, 2024 · 1 comment
Open
1 of 5 tasks
Labels
👕 TypeScript TypeScript typings issue

Comments

@leondeklerkfenetre
Copy link

leondeklerkfenetre commented Sep 23, 2024

What happened?

After the Vue 3.5 upgrade, we get type errors about private types from the ErrorMessage or Field components.:

  • Default export of the module has or is using private name 'FieldSlotProps'
  • Default export of the module has or is using private name 'ErrorMessageSlotProps'

Due to these errors we get serialization errors in TypeScript which cascades through the whole project.
The issue did not occur before we upgraded to Vue 3.5 but only happens for the vee-validate package.

Reproduction steps

  1. Install vee-validate in a new Vue project (using vue-create)
  2. Create a new (.ts) file defining a component:
import { ErrorMessage, Field, Form } from 'vee-validate'
import { defineComponent } from 'vue'

export default defineComponent({
  components: {
    ErrorMessage,
    Field,
    Form
  }
})
  1. Observe the type errors on ErrorMessage and Field components:
    image

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

https://github.com/leondeklerkfenetre/vee-validate-playground

Code of Conduct

@leondeklerkfenetre leondeklerkfenetre changed the title <title> Type errors on vee-validate components after Vue 3.5 update Sep 23, 2024
@rs3d
Copy link

rs3d commented Oct 3, 2024

I had the same issue.

After changing this tsconfig.json line

"composite": true, => "// composite": true,

the error is gone.

@logaretm logaretm added the 👕 TypeScript TypeScript typings issue label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👕 TypeScript TypeScript typings issue
Projects
None yet
Development

No branches or pull requests

3 participants