[valibot] Types generic
Hi there !
I'm trying to create a small helper
get
(then post
later).
I think you can guess what is the endpoint.
I have the following type error:
I tried with BaseSchema
and all kind of combinations, without success..
Any typescript master to help me? 🙏12 Replies
I think
AnySchema
is a specific type of schema rather than the general type you're looking for
Yeah try using extends v.BaseSchema
yeah it seems BaseSchema is more appropriate, but then I need to specify generic params
and I get lost ;D
extends v.BaseSchema<any, any, any>
frontend/src/core/users/users.api.ts|11 col 35-47 error| Generic type 'BaseSchema<TInput, TOutput, TIssue>' requires 3 type argument(s).
ok will try that
you're just looking for it to be a schema, doesn't matter what the generics are
Unexpected any. Specify a different type.
mmmh
is that a ts error or a linter message?
linter
disable linter for that line lol
any is what you want in this case
ok 😄
works fine ty !
noExplicitAny is an annoying rule anyway 😄
😂