Skip to content

Commit 7aea7b0

Browse files
phryneasmarkerikson
authored andcommitted
export ThunkAction and Draft types (#312)
1 parent ac32db0 commit 7aea7b0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

etc/redux-toolkit.api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Reducer } from 'redux';
1616
import { ReducersMapObject } from 'redux';
1717
import { Store } from 'redux';
1818
import { StoreEnhancer } from 'redux';
19+
import { ThunkAction } from 'redux-thunk';
1920
import { ThunkDispatch } from 'redux-thunk';
2021

2122
// @public
@@ -120,6 +121,8 @@ export interface CreateSliceOptions<State = any, CR extends SliceCaseReducers<St
120121
reducers: ValidateSliceCaseReducers<State, CR>;
121122
}
122123

124+
export { Draft }
125+
123126
// @public
124127
export interface EnhancedStore<S = any, A extends Action = AnyAction> extends Store<S, A> {
125128
// (undocumented)
@@ -189,6 +192,8 @@ export type SliceCaseReducers<State> = {
189192
[K: string]: CaseReducer<State, PayloadAction<any>> | CaseReducerWithPrepare<State, PayloadAction<any>>;
190193
};
191194

195+
export { ThunkAction }
196+
192197
// @public
193198
export type ValidateSliceCaseReducers<S, ACR extends SliceCaseReducers<S>> = ACR & {
194199
[P in keyof ACR]: ACR[P] extends {

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export * from 'redux'
2-
export { default as createNextState } from 'immer'
2+
export { default as createNextState, Draft } from 'immer'
33
export { createSelector } from 'reselect'
4+
export { ThunkAction } from 'redux-thunk'
45

56
export {
67
// js

0 commit comments

Comments
 (0)