Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
  • Loading branch information
ncpa0cpl committed Aug 30, 2023
1 parent e8dbe73 commit 1367a5b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/modules/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ export type PublicOf<T> = {
[K in keyof T]: T[K];
};

type MappedAction<A extends (state: any, ...args: any[]) => any> =
A extends (state: any, ...args: infer Args) => infer R
? (...args: Args) => R
: never;
type MappedAction<A> = A extends (
state: any,
...args: infer Args
) => infer R
? (...args: Args) => R
: never;

type MappedActions<A extends object> = {
[K in keyof A]: MappedAction<A[K]>;
Expand Down

0 comments on commit 1367a5b

Please sign in to comment.