ciscoheat / sveltekit-superforms

Making SvelteKit forms a pleasure to use!
https://superforms.rocks
MIT License
2.26k stars 66 forks source link

Argument of type ObjectSchema is not assignable to parameter of type SupportedSchemas #517

Closed thobson closed 4 days ago

thobson commented 4 days ago

Description

Given this:

import * as v from 'valibot'
import { superValidate } from 'sveltekit-superforms'

const schema = v.object({
  name: v.string()
})

const form = await superValidate(request, valibot(schema))

I get the error:

Argument of type 'ObjectSchema<{ readonly name: StringSchema<undefined>; }, undefined>' is not assignable to parameter of type 'SupportedSchemas'.

Type 'ObjectSchema<{ readonly name: StringSchema<undefined>; }, undefined>' is missing the following properties from type 'GenericSchema<unknown, unknown, BaseIssue<unknown>>': '~standard', '~run'

Versions

"valibot": "^0.42.1",
"sveltekit-superforms": "^2.20.1"
maxkrass commented 4 days ago

I have the same issue

maxkrass commented 4 days ago

Ok nvm, I overlooked the latest release notes. RTFM I guess 🤷‍♂️

thobson commented 4 days ago

You're not the only one!