io-ts typing invalid
See original GitHub issueDescribe the bug
Example, copied from README.MD does not work, triggering error on “resolver” property. I had to replace ref
on username
with {...register('username')}
because the typing failed there too, but looks unrelated to resolver (I guess example with ref
is outdated for this react-hook-form example).
To Reproduce See sandbox
Codesandbox link (Required) https://codesandbox.io/s/priceless-gareth-hs0zo?file=/src/App.tsx
Expected behavior No type error
Desktop (please complete the following information):
- OS: linux
- Browser firefox
- Version 89
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
SyntaxError: invalid from typing import TYPE_CHECKING · ...
Virtual env was created and I edited the pipfile.lock once before creating the env Is this a bug or problem with my environment?...
Read more >[SOLVED] Keyboard Typing Wrong Letters (2022)
Your keyboard keeps typing wrong letters? You're not alone! Many Windows users are reporting it. But the good new is you can fix...
Read more >How to Fix Keyboard Typing Wrong Character or Keys Not ...
If still problem not fixed contact me on fb...https://www.facebook.com/mjtube11Keyboard codes...
Read more >Keyboard typing weird letters and symbols
Keyboard typing weird letters and symbols. Hi all. I have tried to use my Macbook Pro this morning and when I type its...
Read more >Keyboard typing wrong characters on windows 10
Try connecting the keyboard to a different USB port if its a USB wired keyboard. Press Windows key + X Click Device Manager...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @akomm,
You’ve to pass yourself the type definition of your form data:
I’m not a user of io-ts, but I think you can do something as Zod do: https://github.com/colinhacks/zod#type-inference
Here is how to use TypeScript with
useForm
: https://react-hook-form.com/ts#UseFormPropsHope it helps 😃
🎉 This issue has been resolved in version 2.6.0 🎉
The release is available on:
Your semantic-release bot 📦🚀