Replies: 1 comment
-
Does this help? https://tsplay.dev/wjLgYm |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I have this code and when i mouse hover to
immerSetup.screen
in vscode it shows anyHow do I make it typesafe ?
On debugging further, I found out this
By setting the generic type explicitly in
atomWithImmer<Setup>
, TypeScript should correctly inferDraft<Setup>
instead ofDraft<Value>
.Link to reproduction
No need just a typescript hint error
Check List
Please do not ask questions in issues.
Please include a minimal reproduction.
Beta Was this translation helpful? Give feedback.
All reactions