File tree 5 files changed +31
-44
lines changed
5 files changed +31
-44
lines changed Original file line number Diff line number Diff line change @@ -6,27 +6,18 @@ defaults:
6
6
run :
7
7
working-directory : ./packages/rtk-query-codegen-openapi
8
8
9
- on : [push, pull_request]
9
+ on :
10
+ push :
11
+ branches :
12
+ - master
13
+ paths :
14
+ - ' packages/rtk-query-codegen-openapi/**'
15
+ pull_request :
16
+ paths :
17
+ - ' packages/rtk-query-codegen-openapi/**'
10
18
11
19
jobs :
12
- changes :
13
- name : Check for changes
14
- runs-on : ubuntu-latest
15
- outputs :
16
- codegen : ${{ steps.filter.outputs.codegen }}
17
- steps :
18
- - uses : actions/checkout@v2
19
- - uses : dorny/paths-filter@v2
20
- id : filter
21
- with :
22
- filters : |
23
- codegen:
24
- - 'packages/rtk-query-codegen-openapi/**'
25
-
26
20
build :
27
- needs : changes
28
- if : ${{ needs.changes.outputs.codegen == 'true' }}
29
-
30
21
runs-on : ubuntu-latest
31
22
32
23
strategy :
Original file line number Diff line number Diff line change 1
1
name : CI
2
- on : [push, pull_request]
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ paths :
7
+ - ' packages/toolkit/**'
8
+ pull_request :
9
+ paths :
10
+ - ' packages/toolkit/**'
11
+
3
12
defaults :
4
13
run :
5
14
working-directory : ./packages/toolkit
6
15
7
16
jobs :
8
- changes :
9
- name : Check for changes
10
- runs-on : ubuntu-latest
11
- outputs :
12
- toolkit : ${{ steps.filter.outputs.toolkit }}
13
- steps :
14
- - uses : actions/checkout@v2
15
- - uses : dorny/paths-filter@v2
16
- id : filter
17
- with :
18
- filters : |
19
- toolkit:
20
- - 'packages/toolkit/**'
21
-
22
17
build :
23
- needs : changes
24
- if : ${{ needs.changes.outputs.toolkit == 'true' }}
25
-
26
18
name : Lint, Test, Build & Pack on Node ${{ matrix.node }}
27
19
28
20
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -235,7 +235,9 @@ export type ValidateSliceCaseReducers<
235
235
? {
236
236
prepare ( ...a : never [ ] ) : Omit < A , 'type' >
237
237
}
238
- : ACR [ T ]
238
+ : { }
239
+ // this should still error in 4.8 - the fix woule be
240
+ // : ACR[T]
239
241
}
240
242
241
243
function getType ( slice : string , actionKey : string ) : string {
@@ -268,8 +270,10 @@ export function createSlice<
268
270
typeof process !== 'undefined' &&
269
271
process . env . NODE_ENV === 'development'
270
272
) {
271
- if ( options . initialState === undefined ) {
272
- console . error ( 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`' )
273
+ if ( options . initialState === undefined ) {
274
+ console . error (
275
+ 'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`'
276
+ )
273
277
}
274
278
}
275
279
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