-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Valibot toTypedSchema
throws type error Argument of type ObjectSchema is not assignable to parameter of type BaseSchema
#4951
Comments
the readonly property (i just ran into this issue too) seems like types are correct in the latest main, but maybe an up to date release has not been made. |
if you or anyone who needs this fixed before the maintainers get to it i'd suggest the following:
|
I will tag the latest soon after I test a few things around valibot and i18n. Thank you @slyduda for posting a workaround. |
As a quick workaround without cloning a repo this also works. Types isnt corrent but at least no exception in runtime // @ts-expect-error
// eslint-disable-next-line vue/no-mutating-props
props.schema['~validate'] = props.schema['~run']; |
This workaround doesn't work because Rolling back to [email protected] and [email protected] works. |
any update on this? if not, any way we can help? |
What happened?
Code snippet directly copied from documentation causes type error on the screenshot.
Package versions:
Reproduction steps
No response
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/vee-validate-v4-radio-ssadza?file=src%2FApp.vue (see the console output)
Code of Conduct
The text was updated successfully, but these errors were encountered: