File tree 3 files changed +10
-8
lines changed
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ export type ValidateSliceCaseReducers<
235
235
? {
236
236
prepare ( ...a : never [ ] ) : Omit < A , 'type' >
237
237
}
238
- : ACR [ T ]
238
+ : { }
239
239
}
240
240
241
241
function getType ( slice : string , actionKey : string ) : string {
@@ -268,8 +268,10 @@ export function createSlice<
268
268
typeof process !== 'undefined' &&
269
269
process . env . NODE_ENV === 'development'
270
270
) {
271
- if ( options . initialState === undefined ) {
272
- console . error ( 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`' )
271
+ if ( options . initialState === undefined ) {
272
+ console . error (
273
+ 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`'
274
+ )
273
275
}
274
276
}
275
277
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ import type {
9
9
PayloadAction ,
10
10
SliceCaseReducers ,
11
11
ValidateSliceCaseReducers ,
12
- } from '@reduxjs/toolkit '
13
- import { createAction , createSlice } from '@reduxjs/toolkit '
12
+ } from '.. '
13
+ import { createAction , createSlice } from '.. '
14
14
import { expectType } from './helpers'
15
15
16
16
/*
@@ -58,7 +58,7 @@ const value = actionCreators.anyKey
58
58
reducers : {
59
59
increment : ( state : number , action ) => {
60
60
// @ts -expect-error
61
- expect < string > ( state )
61
+ expectType < string > ( state )
62
62
return state + action . payload
63
63
} ,
64
64
decrement : ( state : number , action ) => state - action . payload ,
@@ -101,7 +101,7 @@ const value = actionCreators.anyKey
101
101
{ payload = 1 } : PayloadAction < number | undefined >
102
102
) => {
103
103
// @ts -expect-error
104
- expect < string > ( state )
104
+ expectType < string > ( state )
105
105
return state - payload
106
106
} ,
107
107
Original file line number Diff line number Diff line change 1
1
{
2
- "extends" : " ../toolkit /tsconfig.base.json" ,
2
+ "extends" : " ./tsconfig.base.json" ,
3
3
"compilerOptions" : {
4
4
"allowSyntheticDefaultImports" : true ,
5
5
"esModuleInterop" : true ,
You can’t perform that action at this time.
0 commit comments