Skip to content

Commit 92dbfdd

Browse files
committed
Export problematic types that were causing type portability issues
- This should serve as a partial fix for reduxjs#3962, reduxjs#4448, reduxjs#3983, reduxjs#4066, reduxjs#4108, reduxjs#4401 - Here is the list of the problematic (now exported) types: From `@reduxjs/toolkit`: - `CombinedSliceReducer` - `CaseReducerDefinition` - `Id` renamed to `TSHelpersId` - `UncheckedIndexedAccess` - `ReducerWithInitialState` - `CaseReducerDefinition` - `Id` renamed to `TSHelpersId` - `UncheckedIndexedAccess` - `ReducerWithInitialState` From `@reduxjs/toolkit/query/react`: - `UseLazyQuery` - `UseQuery` - `QueryHooks`
1 parent 32b0155 commit 92dbfdd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/toolkit/src/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export type {
6060
Actions,
6161
CaseReducer,
6262
CaseReducers,
63+
ReducerWithInitialState,
6364
} from './createReducer'
6465
export {
6566
// js
@@ -79,6 +80,7 @@ export type {
7980
CaseReducerWithPrepare,
8081
ReducerCreators,
8182
SliceSelectors,
83+
CaseReducerDefinition,
8284
} from './createSlice'
8385
export type { ActionCreatorInvariantMiddlewareOptions } from './actionCreatorInvariantMiddleware'
8486
export { createActionCreatorInvariantMiddleware } from './actionCreatorInvariantMiddleware'
@@ -202,11 +204,14 @@ export type { AutoBatchOptions } from './autoBatchEnhancer'
202204

203205
export { combineSlices } from './combineSlices'
204206

205-
export type { WithSlice } from './combineSlices'
207+
export type { CombinedSliceReducer, WithSlice } from './combineSlices'
206208

207209
export type {
208210
ExtractDispatchExtensions as TSHelpersExtractDispatchExtensions,
211+
Id as TSHelpersId,
209212
SafePromise,
210213
} from './tsHelpers'
211214

212215
export { formatProdErrorMessage } from './formatProdErrorMessage'
216+
217+
export type { UncheckedIndexedAccess } from './uncheckedindexed'

packages/toolkit/src/query/react/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const createApi = /* @__PURE__ */ buildCreateApi(
1414
)
1515

1616
export type {
17+
QueryHooks,
1718
TypedUseMutationResult,
1819
TypedUseQueryHookResult,
1920
TypedUseQueryStateResult,
@@ -26,5 +27,7 @@ export type {
2627
TypedUseQuery,
2728
TypedUseQuerySubscription,
2829
TypedUseLazyQuerySubscription,
30+
UseLazyQuery,
31+
UseQuery,
2932
} from './buildHooks'
3033
export { createApi, reactHooksModule, reactHooksModuleName }

0 commit comments

Comments
 (0)