immer middleware produces TS4023 #3439
-
Bug DescriptionHi, I'm currently working on a lib with zustand and immer. If I use the immer middleware as stated in the docs, TypeScript Compiler is throwing error immer keeps In addition, a workaround or something like "known limitations" for zustand middleware usage with certain compiler options in the documentation would be great. Reproduction Linkhttps://github.com/OGS-GmbH/guthrie/blob/fix/immer-middleware/src/stores/templates.ts |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
PS: Handling issues as discussion is also a bit confusing |
Beta Was this translation helpful? Give feedback.


@simonkovtyk @Gilthayllor tsplayground doesn't complain about that, so feels like is something on your side. Which version of typescript are you using?
https://www.typescriptlang.org/play/?target=10&ts=5.2.2#code/JYWwDg9gTgLgBDAnmApnA3nAyjAhjFAYShX2gBpsZoUBZAVz2qgEkATFAOxmADNgUUOAF84vKBBBwA5AC96AZzyc2AegBuuTsAA2O3NIDcAKCSo4LECEFwAvHAA8AFUq0wCuCgAeBFR4DaODQMTNDsXDz8gpT0nADWnBAA7pwAuv6pdnAZrgDGHt6+bAFBJCFkrBzcfAJQMfGJKemZ9jlwAKpZTgB8ABTA2jy4OsCyggBcVPhEJBXOlP4AdMtuCgtyispqoNZQ0pScKOqCqal5ax3dAJR23VMExKTM83CrC-4bSlrbVoL7cIdjlAznBlotaPkQe1uoYgA