UNPKG

4.09 kBPlain TextView Raw
1import { enableES5 } from 'immer'
2export * from 'redux'
3export {
4 default as createNextState,
5 current,
6 freeze,
7 original,
8 isDraft,
9} from 'immer'
10export type { Draft } from 'immer'
11export { createSelector } from 'reselect'
12export type {
13 Selector,
14 OutputParametricSelector,
15 OutputSelector,
16 ParametricSelector,
17} from 'reselect'
18export { createDraftSafeSelector } from './createDraftSafeSelector'
19export type { ThunkAction, ThunkDispatch } from 'redux-thunk'
20
21// We deliberately enable Immer's ES5 support, on the grounds that
22// we assume RTK will be used with React Native and other Proxy-less
23// environments. In addition, that's how Immer 4 behaved, and since
24// we want to ship this in an RTK minor, we should keep the same behavior.
25enableES5()
26
27export {
28 // js
29 configureStore,
30} from './configureStore'
31export type {
32 // types
33 ConfigureEnhancersCallback,
34 ConfigureStoreOptions,
35 EnhancedStore,
36} from './configureStore'
37export {
38 // js
39 createAction,
40 getType,
41} from './createAction'
42export type {
43 // types
44 PayloadAction,
45 PayloadActionCreator,
46 ActionCreatorWithNonInferrablePayload,
47 ActionCreatorWithOptionalPayload,
48 ActionCreatorWithPayload,
49 ActionCreatorWithoutPayload,
50 ActionCreatorWithPreparedPayload,
51 PrepareAction,
52} from './createAction'
53export {
54 // js
55 createReducer,
56} from './createReducer'
57export type {
58 // types
59 Actions,
60 CaseReducer,
61 CaseReducers,
62} from './createReducer'
63export {
64 // js
65 createSlice,
66} from './createSlice'
67
68export type {
69 // types
70 CreateSliceOptions,
71 Slice,
72 CaseReducerActions,
73 SliceCaseReducers,
74 ValidateSliceCaseReducers,
75 CaseReducerWithPrepare,
76 SliceActionCreator,
77} from './createSlice'
78export {
79 // js
80 createImmutableStateInvariantMiddleware,
81 isImmutableDefault,
82} from './immutableStateInvariantMiddleware'
83export type {
84 // types
85 ImmutableStateInvariantMiddlewareOptions,
86} from './immutableStateInvariantMiddleware'
87export {
88 // js
89 createSerializableStateInvariantMiddleware,
90 findNonSerializableValue,
91 isPlain,
92} from './serializableStateInvariantMiddleware'
93export type {
94 // types
95 SerializableStateInvariantMiddlewareOptions,
96} from './serializableStateInvariantMiddleware'
97export {
98 // js
99 getDefaultMiddleware,
100} from './getDefaultMiddleware'
101export type {
102 // types
103 ActionReducerMapBuilder,
104} from './mapBuilders'
105export { MiddlewareArray } from './utils'
106
107export { createEntityAdapter } from './entities/create_adapter'
108export type {
109 Dictionary,
110 EntityState,
111 EntityAdapter,
112 EntitySelectors,
113 EntityStateAdapter,
114 EntityId,
115 Update,
116 IdSelector,
117 Comparer,
118} from './entities/models'
119
120export {
121 createAsyncThunk,
122 unwrapResult,
123 miniSerializeError,
124} from './createAsyncThunk'
125export type {
126 AsyncThunk,
127 AsyncThunkOptions,
128 AsyncThunkAction,
129 AsyncThunkPayloadCreatorReturnValue,
130 AsyncThunkPayloadCreator,
131 SerializedError,
132} from './createAsyncThunk'
133
134export {
135 // js
136 isAllOf,
137 isAnyOf,
138 isPending,
139 isRejected,
140 isFulfilled,
141 isAsyncThunkAction,
142 isRejectedWithValue,
143} from './matchers'
144export type {
145 // types
146 ActionMatchingAllOf,
147 ActionMatchingAnyOf,
148} from './matchers'
149
150export { nanoid } from './nanoid'
151
152export { default as isPlainObject } from './isPlainObject'
153
154export type {
155 ListenerEffect,
156 ListenerMiddleware,
157 ListenerEffectAPI,
158 ListenerMiddlewareInstance,
159 CreateListenerMiddlewareOptions,
160 ListenerErrorHandler,
161 TypedStartListening,
162 TypedAddListener,
163 TypedStopListening,
164 TypedRemoveListener,
165 UnsubscribeListener,
166 UnsubscribeListenerOptions,
167 ForkedTaskExecutor,
168 ForkedTask,
169 ForkedTaskAPI,
170 AsyncTaskExecutor,
171 SyncTaskExecutor,
172 TaskCancelled,
173 TaskRejected,
174 TaskResolved,
175 TaskResult,
176} from './listenerMiddleware/index'
177
178export {
179 createListenerMiddleware,
180 addListener,
181 removeListener,
182 clearAllListeners,
183 TaskAbortError,
184} from './listenerMiddleware/index'