-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
✨ enhancementa "nice to have" featurea "nice to have" feature
Description
Is your feature request related to a problem? Please describe.
Currently, @vee-validate/valibot
and the latest published release of Valibot (currently 0.31.0-rc.5
) cannot be used together. It looks like Valibot 0.31.0 has a number of API changes. A TypeScript error is thrown when trying to pass an object schema to toTypedSchema
, which looks like:
Argument of type 'ObjectSchema<{ readonly groupName: SchemaWithPipe<[StringSchema<undefined>, TrimAction]>; readonly notes: StringSchema<undefined>; }, undefined>' is not assignable to parameter of type 'BaseSchema | BaseSchemaAsync'.
Property '_parse' is missing in type 'ObjectSchema<{ readonly groupName: SchemaWithPipe<[StringSchema<undefined>, TrimAction]>; readonly notes: StringSchema<undefined>; }, undefined>' but required in type 'BaseSchema'.ts-plugin(2345)
index.d.ts(339, 5): '_parse' is declared here.
Describe the solution you'd like
I'm filing this as a feature request not as a bug because Valibot is still at RC-5 (so not technically a bug), but it looks like the API is stable enough to provide support.
Describe alternatives you've considered
No alternatives except not using latest Valibot.
Metadata
Metadata
Assignees
Labels
✨ enhancementa "nice to have" featurea "nice to have" feature