Skip to content

Commit d8b7e4a

Browse files
committed
dryer
1 parent 6e54666 commit d8b7e4a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/toolkit/src/dynamicMiddleware/tests/index.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ import { isAllOf } from '../../matchers'
88

99
const probeType = 'probeableMW/probe'
1010

11-
type ProbeType = typeof probeType
12-
13-
export interface ProbeMiddleware extends BaseActionCreator<number, ProbeType> {
14-
<Id extends number>(id: Id): PayloadAction<Id, ProbeType>
11+
export interface ProbeMiddleware
12+
extends BaseActionCreator<number, typeof probeType> {
13+
<Id extends number>(id: Id): PayloadAction<Id, typeof probeType>
1514
}
1615

1716
export const probeMiddleware = createAction(probeType) as ProbeMiddleware
@@ -24,7 +23,7 @@ const matchId =
2423
export const makeProbeableMiddleware = <Id extends number>(
2524
id: Id
2625
): Middleware<{
27-
(action: PayloadAction<Id, ProbeType>): Id
26+
(action: PayloadAction<Id, typeof probeType>): Id
2827
}> => {
2928
const isMiddlewareAction = isAllOf(isAction, probeMiddleware, matchId(id))
3029
return (api) => (next) => (action) => {

0 commit comments

Comments
 (0)