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