Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with typescript #26

Open
bryanltobing opened this issue Mar 1, 2022 · 6 comments
Open

Use with typescript #26

bryanltobing opened this issue Mar 1, 2022 · 6 comments

Comments

@bryanltobing
Copy link

When i use this with typescript i need to add any type everywhere? could you please add an example with typescript ?

@bsor-dev
Copy link

bsor-dev commented Mar 5, 2022

+1

@diegosaraviamamani
Copy link

+2

@AlexandreCassagne
Copy link

+3

@Effzz
Copy link

Effzz commented May 21, 2022

+4

@narendra087
Copy link

+5

@hati8haha
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants