Skip to content

Commit

Permalink
export ThunkAction and Draft types (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas authored and markerikson committed Jan 16, 2020
1 parent ac32db0 commit 7aea7b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions etc/redux-toolkit.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Reducer } from 'redux';
import { ReducersMapObject } from 'redux';
import { Store } from 'redux';
import { StoreEnhancer } from 'redux';
import { ThunkAction } from 'redux-thunk';
import { ThunkDispatch } from 'redux-thunk';

// @public
Expand Down Expand Up @@ -120,6 +121,8 @@ export interface CreateSliceOptions<State = any, CR extends SliceCaseReducers<St
reducers: ValidateSliceCaseReducers<State, CR>;
}

export { Draft }

// @public
export interface EnhancedStore<S = any, A extends Action = AnyAction> extends Store<S, A> {
// (undocumented)
Expand Down Expand Up @@ -189,6 +192,8 @@ export type SliceCaseReducers<State> = {
[K: string]: CaseReducer<State, PayloadAction<any>> | CaseReducerWithPrepare<State, PayloadAction<any>>;
};

export { ThunkAction }

// @public
export type ValidateSliceCaseReducers<S, ACR extends SliceCaseReducers<S>> = ACR & {
[P in keyof ACR]: ACR[P] extends {
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from 'redux'
export { default as createNextState } from 'immer'
export { default as createNextState, Draft } from 'immer'
export { createSelector } from 'reselect'
export { ThunkAction } from 'redux-thunk'

export {
// js
Expand Down

0 comments on commit 7aea7b0

Please sign in to comment.