Easy-Peasy with TS compile error
After I implement the TS with Easy-Peasy, and comiple, I got the follow error:
I never installed ts-toolbelt. But later I install the TS-Belt, still got the same error.
`D:xxxxxxPath/node_modules/ts-toolbelt/out/Any/At.d.ts TypeScript error in D:/GitHub/A4Me_SPA/react_a4me_2.0/node_modules/ts-toolbelt/out/Any/At.d.ts(24,121): Type expected. TS1110
22 | *
23 | */
24 | export declare type At<A extends any, K extends Key> = A extends List ? number extends A['length'] ? K extends number |
${number}? A[never] | undefined : undefined : K extends keyof A ? A[K] : undefined : unknown extends A ? unknown : K extends keyof A ? A[K] : undefined; | ^ 25 | `
my code is below: `import { Action, action, createStore, Thunk, thunk } from "easy-peasy"; import { chatCollection, chatCollectionName, } from "../../BeforeLogin2/Chat/000ChatCommonUtil"; import { IChatData } from "../../DataModal/DataModal";
interface IReduxChatArray {
chatArray: IChatData[];
fetchChatArrays: Thunk
const ReduxChatArray: IReduxChatArray = { chatArray: [], fetchChatArrays: thunk(async (actions) => { let temp: IChatData[] = []; actions.setChatArray(temp); }),
setChatArray: action((state, tempChatArray) => { state.chatArray = tempChatArray; }), };
export default createStore
I got it compiled with v3, but v5 it's not working
Could you please create a reproduction in CodeSandbox?
I'm getting something similar here with v5. It's on a big project, but I'll see if I can replicate on something smaller