@@ -507,17 +507,8 @@ type CreatorCallback<
507
507
) => Record < string , ReducerDefinition >
508
508
509
509
type GetCaseReducers <
510
- State ,
511
- Name extends string ,
512
- ReducerPath extends string ,
513
- CreatorMap extends Record < string , RegisteredReducerType > ,
514
- CR extends
515
- | SliceCaseReducers < State >
516
- | CreatorCallback < State , Name , ReducerPath , CreatorMap > ,
517
- > =
518
- CR extends CreatorCallback < State , Name , ReducerPath , CreatorMap >
519
- ? ReturnType < CR >
520
- : CR
510
+ CR extends SliceCaseReducers < any > | CreatorCallback < any , any , any , any > ,
511
+ > = CR extends CreatorCallback < any , any , any , any > ? ReturnType < CR > : CR
521
512
522
513
/**
523
514
* Options for `createSlice()`.
@@ -916,13 +907,7 @@ export function buildCreateSlice<
916
907
Selectors ,
917
908
CreatorMap
918
909
> ,
919
- ) : Slice <
920
- State ,
921
- GetCaseReducers < State , Name , ReducerPath , CreatorMap , CaseReducers > ,
922
- Name ,
923
- ReducerPath ,
924
- Selectors
925
- > {
910
+ ) : Slice < State , GetCaseReducers < CaseReducers > , Name , ReducerPath , Selectors > {
926
911
const { name, reducerPath = name as unknown as ReducerPath } = options
927
912
if ( ! name ) {
928
913
throw new Error ( '`name` is a required option for createSlice' )
@@ -1119,7 +1104,7 @@ export function buildCreateSlice<
1119
1104
) : Pick <
1120
1105
Slice <
1121
1106
State ,
1122
- GetCaseReducers < State , Name , ReducerPath , CreatorMap , CaseReducers > ,
1107
+ GetCaseReducers < CaseReducers > ,
1123
1108
Name ,
1124
1109
CurrentReducerPath ,
1125
1110
Selectors
0 commit comments