Skip to content

Commit

Permalink
fix: remove useless default generic value in createActionCreator
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Hasani authored and the-dr-lazy committed Jun 24, 2019
1 parent 88632e4 commit 7538ae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/create-action-creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ export type ActionCreator<T extends AnyAction | string> = T extends AnyAction
*/
export function createActionCreator<
TType extends string,
TCallable extends <_T>(...args: any[]) => Action<TType> = () => Action<TType>
TCallable extends <_T>(...args: any[]) => Action<TType>
>(
type: TType,
executor: (
resolve: <Payload = undefined, Meta = undefined>(
payload?: Payload,
meta?: Meta
) => Action<TType, Payload, Meta>
) => TCallable = resolve => (() => resolve()) as any
) => TCallable = resolve => (() => resolve()) as TCallable
) {
const callable = executor((payload, meta) =>
createAction(type, payload!, meta!)
Expand Down

0 comments on commit 7538ae0

Please sign in to comment.