Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/reduxjs/redux into migrat…
Browse files Browse the repository at this point in the history
…e-typetests-to-vitest
  • Loading branch information
aryaemami59 committed May 10, 2024
2 parents 3d3d3a6 + ef57856 commit 9b28ab7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/usage/UsageWithTypescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ export const store = configureStore({
})

// highlight-start
// Get the type of our store variable
export type AppStore = typeof store
// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>
export type RootState = ReturnType<AppStore['getState']>
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch
export type AppDispatch = AppStore['dispatch']
// highlight-end
```
Expand Down

0 comments on commit 9b28ab7

Please sign in to comment.