@@ -30,9 +30,9 @@ type Write<T, U> = Omit<T, keyof U> & U
30
30
type TakeTwo < T > = T extends { length : 0 }
31
31
? [ undefined , undefined ]
32
32
: T extends { length : 1 }
33
- ? [ ...a0 : Cast < T , unknown [ ] > , a1 : undefined ]
33
+ ? [ ...args0 : Cast < T , unknown [ ] > , arg1 : undefined ]
34
34
: T extends { length : 0 | 1 }
35
- ? [ ...a0 : Cast < T , unknown [ ] > , a1 : undefined ]
35
+ ? [ ...args0 : Cast < T , unknown [ ] > , arg1 : undefined ]
36
36
: T extends { length : 2 }
37
37
? T
38
38
: T extends { length : 1 | 2 }
@@ -58,13 +58,13 @@ type Action =
58
58
type StoreDevtools < S > = S extends {
59
59
setState : {
60
60
// capture both overloads of setState
61
- ( ...a : infer Sa1 ) : infer Sr1
62
- ( ...a : infer Sa2 ) : infer Sr2
61
+ ( ...args : infer Sa1 ) : infer Sr1
62
+ ( ...args : infer Sa2 ) : infer Sr2
63
63
}
64
64
}
65
65
? {
66
- setState ( ...a : [ ...a : TakeTwo < Sa1 > , action ?: Action ] ) : Sr1
67
- setState ( ...a : [ ...a : TakeTwo < Sa2 > , action ?: Action ] ) : Sr2
66
+ setState ( ...args : [ ...args : TakeTwo < Sa1 > , action ?: Action ] ) : Sr1
67
+ setState ( ...args : [ ...args : TakeTwo < Sa2 > , action ?: Action ] ) : Sr2
68
68
}
69
69
: never
70
70
@@ -231,10 +231,10 @@ const devtoolsImpl: DevtoolsImpl =
231
231
) {
232
232
let didWarnAboutReservedActionType = false
233
233
const originalDispatch = ( api as any ) . dispatch
234
- ; ( api as any ) . dispatch = ( ...a : any [ ] ) => {
234
+ ; ( api as any ) . dispatch = ( ...args : any [ ] ) => {
235
235
if (
236
236
import . meta. env ?. MODE !== 'production' &&
237
- a [ 0 ] . type === '__setState' &&
237
+ args [ 0 ] . type === '__setState' &&
238
238
! didWarnAboutReservedActionType
239
239
) {
240
240
console . warn (
@@ -243,7 +243,7 @@ const devtoolsImpl: DevtoolsImpl =
243
243
)
244
244
didWarnAboutReservedActionType = true
245
245
}
246
- ; ( originalDispatch as any ) ( ...a )
246
+ ; ( originalDispatch as any ) ( ...args )
247
247
}
248
248
}
249
249
@@ -372,7 +372,7 @@ const devtoolsImpl: DevtoolsImpl =
372
372
}
373
373
export const devtools = devtoolsImpl as unknown as Devtools
374
374
375
- const parseJsonThen = < T > ( stringified : string , f : ( parsed : T ) => void ) => {
375
+ const parseJsonThen = < T > ( stringified : string , fn : ( parsed : T ) => void ) => {
376
376
let parsed : T | undefined
377
377
try {
378
378
parsed = JSON . parse ( stringified )
@@ -382,5 +382,5 @@ const parseJsonThen = <T>(stringified: string, f: (parsed: T) => void) => {
382
382
e ,
383
383
)
384
384
}
385
- if ( parsed !== undefined ) f ( parsed as T )
385
+ if ( parsed !== undefined ) fn ( parsed as T )
386
386
}
0 commit comments