Open bryanltobing opened 2 years ago
+1
+2
+3
+4
+5
typeof
Type Operator can help you get type of store
. Here is my solution:
export type AppStore = typeof store
interface IPersistStore extends AppStore {
__persistor: Persistor
}
export const makeStore = (context?: Context): IPersistStore => {
return { ...store, __persistor: persistStore(store) }
}
export const wrapper = createWrapper(makeStore)
When i use this with typescript i need to add any type everywhere? could you please add an example with typescript ?