File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/toolkit/src/tests Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1022,9 +1022,7 @@ describe('createSlice', () => {
1022
1022
test ( 'context.selectSlice throws if unable to find slice state' , ( ) => {
1023
1023
const patchCreator : ReducerCreator < typeof patchCreatorType > = {
1024
1024
type : patchCreatorType ,
1025
- create ( ) {
1026
- return { _reducerDefinitionType : patchCreatorType }
1027
- } ,
1025
+ create : { _reducerDefinitionType : patchCreatorType } ,
1028
1026
handle ( { type } , _def , context ) {
1029
1027
const patchedAction = createAction < Patch [ ] > ( type )
1030
1028
function patchThunk (
@@ -1062,7 +1060,7 @@ describe('createSlice', () => {
1062
1060
name : 'person' ,
1063
1061
initialState : { name : 'Alice' } ,
1064
1062
reducers : ( create ) => ( {
1065
- patchPerson : create . patcher ( ) ,
1063
+ patchPerson : create . patcher ,
1066
1064
} ) ,
1067
1065
} )
1068
1066
@@ -1244,7 +1242,7 @@ declare module '@reduxjs/toolkit' {
1244
1242
>
1245
1243
[ patchCreatorType ] : ReducerCreatorEntry <
1246
1244
State extends Objectish
1247
- ? ( ) => ReducerDefinition < typeof patchCreatorType >
1245
+ ? ReducerDefinition < typeof patchCreatorType >
1248
1246
: never ,
1249
1247
{
1250
1248
actions : {
You can’t perform that action at this time.
0 commit comments