Closed decipher-cs closed 8 months ago
Hey deciper-cs, we just implemented Zusty for TypeScript, if you follow the README, you will find our new npm module for Typescript and how to implement it for Typescript. Let us know if you have any other issues, thank you!
@decipher-cs
Hate to be the bearer of bad news but it doesn't work. Here's the error I got after copying the example from your npm's readme verbatim.
Argument of type 'Middleware' is not assignable to parameter of type 'StateCreator<BearState, [], [], BearState>'.
Type 'Middleware' is not assignable to type '(setState: (partial: BearState | Partial<BearState> | ((state: BearState) => BearState | Partial<BearState>), replace?: boolean | undefined) => void, getState: () => BearState, store: StoreApi<...>) => BearState'.
Type 'Store' is missing the following properties from type 'BearState': bears, increase, removeAllBearstypescript(2345)
Here's a sandbox. codesandbox
Hi @decipher-cs thanks for the sandbox and letting us know. The TS middleware has now been fixed. Let us know if you have any further issues.
import zustymiddleware from 'zustymiddleware'
throws the following error:Is there going to be support for it in the future?