UNPKG

4.41 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, ThunkMiddleware } 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 type { DevToolsEnhancerOptions } from './devtoolsExtension'
38export {
39 // js
40 createAction,
41 getType,
42} from './createAction'
43export type {
44 // types
45 PayloadAction,
46 PayloadActionCreator,
47 ActionCreatorWithNonInferrablePayload,
48 ActionCreatorWithOptionalPayload,
49 ActionCreatorWithPayload,
50 ActionCreatorWithoutPayload,
51 ActionCreatorWithPreparedPayload,
52 PrepareAction,
53} from './createAction'
54export {
55 // js
56 createReducer,
57} from './createReducer'
58export type {
59 // types
60 Actions,
61 CaseReducer,
62 CaseReducers,
63} from './createReducer'
64export {
65 // js
66 createSlice,
67} from './createSlice'
68
69export type {
70 // types
71 CreateSliceOptions,
72 Slice,
73 CaseReducerActions,
74 SliceCaseReducers,
75 ValidateSliceCaseReducers,
76 CaseReducerWithPrepare,
77 SliceActionCreator,
78} from './createSlice'
79export {
80 // js
81 createImmutableStateInvariantMiddleware,
82 isImmutableDefault,
83} from './immutableStateInvariantMiddleware'
84export type {
85 // types
86 ImmutableStateInvariantMiddlewareOptions,
87} from './immutableStateInvariantMiddleware'
88export {
89 // js
90 createSerializableStateInvariantMiddleware,
91 findNonSerializableValue,
92 isPlain,
93} from './serializableStateInvariantMiddleware'
94export type {
95 // types
96 SerializableStateInvariantMiddlewareOptions,
97} from './serializableStateInvariantMiddleware'
98export {
99 // js
100 getDefaultMiddleware,
101} from './getDefaultMiddleware'
102export type {
103 // types
104 ActionReducerMapBuilder,
105} from './mapBuilders'
106export { MiddlewareArray } from './utils'
107
108export { createEntityAdapter } from './entities/create_adapter'
109export type {
110 Dictionary,
111 EntityState,
112 EntityAdapter,
113 EntitySelectors,
114 EntityStateAdapter,
115 EntityId,
116 Update,
117 IdSelector,
118 Comparer,
119} from './entities/models'
120
121export {
122 createAsyncThunk,
123 unwrapResult,
124 miniSerializeError,
125} from './createAsyncThunk'
126export type {
127 AsyncThunk,
128 AsyncThunkOptions,
129 AsyncThunkAction,
130 AsyncThunkPayloadCreatorReturnValue,
131 AsyncThunkPayloadCreator,
132 SerializedError,
133} from './createAsyncThunk'
134
135export {
136 // js
137 isAllOf,
138 isAnyOf,
139 isPending,
140 isRejected,
141 isFulfilled,
142 isAsyncThunkAction,
143 isRejectedWithValue,
144} from './matchers'
145export type {
146 // types
147 ActionMatchingAllOf,
148 ActionMatchingAnyOf,
149} from './matchers'
150
151export { nanoid } from './nanoid'
152
153export { default as isPlainObject } from './isPlainObject'
154
155export type {
156 ListenerEffect,
157 ListenerMiddleware,
158 ListenerEffectAPI,
159 ListenerMiddlewareInstance,
160 CreateListenerMiddlewareOptions,
161 ListenerErrorHandler,
162 TypedStartListening,
163 TypedAddListener,
164 TypedStopListening,
165 TypedRemoveListener,
166 UnsubscribeListener,
167 UnsubscribeListenerOptions,
168 ForkedTaskExecutor,
169 ForkedTask,
170 ForkedTaskAPI,
171 AsyncTaskExecutor,
172 SyncTaskExecutor,
173 TaskCancelled,
174 TaskRejected,
175 TaskResolved,
176 TaskResult,
177} from './listenerMiddleware/index'
178export type { AnyListenerPredicate } from './listenerMiddleware/types'
179
180export {
181 createListenerMiddleware,
182 addListener,
183 removeListener,
184 clearAllListeners,
185 TaskAbortError,
186} from './listenerMiddleware/index'
187
188export {
189 SHOULD_AUTOBATCH,
190 prepareAutoBatched,
191 autoBatchEnhancer,
192} from './autoBatchEnhancer'
193export type { AutoBatchOptions } from './autoBatchEnhancer'