Closed divmgl closed 1 month ago
Also does not work with the new TypeCompiler.Compile
. Could it be because of our TypeScript version? We're on 5.4.5.
@huynhducduy apologies for pinging you here. I see that you worked on this for 3.8.0. https://github.com/react-hook-form/resolvers/pull/674
Did you run into this during development? I'm thinking about switching my codebase over to TypeBox to overcome the Zod performance issues, but I'm running into this problem with @hookform/resolvers
which is blocking the switch.
@divmgl can you first try to use it with @hookform/resolvers
3.7.0
? and maybe with a newer typescript version too. Im using typescript 5.5.3
and it works just fine.
Hm, I wonder if this is a TypeBox
problem.
Argument of type 'TObject<{ name: TString; groupId: TString; }>' is not assignable to parameter of type 'TObject<TProperties>'.
Property '[Kind]' is missing in type 'TObject<{ name: TString; groupId: TString; }>' but required in type 'TObject<TProperties>'.ts(2345)
typebox.d.ts(240, 5): '[Kind]' is declared here.
This is happening in 3.7.0. Really strange.
I did not face any similar problems. Can you reproduce the error in a fresh source code?
I cleaned the repo and removed incremental build info files and things are working as expected now. Cheers.
Describe the bug I'm getting this error:
Here is the TypeBox schema:
Why is this happening?
Expected behavior No error occurs.
Additional context TypeBox version: 0.32.35
@hookform/resolvers
: 3.9.0