@@ -12,14 +12,12 @@ import type {
12
12
} from './createAsyncThunk'
13
13
14
14
/** @public */
15
- export type ActionMatchingAnyOf <
16
- Matchers extends [ Matcher < any > , ...Matcher < any > [ ] ]
17
- > = ActionFromMatcher < Matchers [ number ] >
15
+ export type ActionMatchingAnyOf < Matchers extends [ ...Matcher < any > [ ] ] > =
16
+ ActionFromMatcher < Matchers [ number ] >
18
17
19
18
/** @public */
20
- export type ActionMatchingAllOf <
21
- Matchers extends [ Matcher < any > , ...Matcher < any > [ ] ]
22
- > = UnionToIntersection < ActionMatchingAnyOf < Matchers > >
19
+ export type ActionMatchingAllOf < Matchers extends [ ...Matcher < any > [ ] ] > =
20
+ UnionToIntersection < ActionMatchingAnyOf < Matchers > >
23
21
24
22
const matches = ( matcher : Matcher < any > , action : any ) => {
25
23
if ( hasMatchFunction ( matcher ) ) {
@@ -38,7 +36,7 @@ const matches = (matcher: Matcher<any>, action: any) => {
38
36
*
39
37
* @public
40
38
*/
41
- export function isAnyOf < Matchers extends [ Matcher < any > , ...Matcher < any > [ ] ] > (
39
+ export function isAnyOf < Matchers extends [ ...Matcher < any > [ ] ] > (
42
40
...matchers : Matchers
43
41
) {
44
42
return ( action : any ) : action is ActionMatchingAnyOf < Matchers > => {
@@ -55,7 +53,7 @@ export function isAnyOf<Matchers extends [Matcher<any>, ...Matcher<any>[]]>(
55
53
*
56
54
* @public
57
55
*/
58
- export function isAllOf < Matchers extends [ Matcher < any > , ...Matcher < any > [ ] ] > (
56
+ export function isAllOf < Matchers extends [ ...Matcher < any > [ ] ] > (
59
57
...matchers : Matchers
60
58
) {
61
59
return ( action : any ) : action is ActionMatchingAllOf < Matchers > => {
0 commit comments