set()
with function does not throw type errors when return data is incorrect
#2879
-
Bug DescriptionHello! A small example is this (available at StackBlitz, see reproduction link):
And since I'm writing anyway, just want to grasp the opportunity and say thanks for this nice library! 🤝 Reproduction Linkhttps://stackblitz.com/edit/vitejs-vite-igq5xy?file=src%2FexampleStore.ts |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
It doesn't show the error in TS playground.
Thanks!! |
Beta Was this translation helpful? Give feedback.
Hmm, seems to be a limitation or something I haven't understood yet in the world of TS then. Closing this since it's obviously not a bug in zustand. Thanks for the help @dai-shi 🤝