Expected 0 arguments, but got 1.ts(2554) when implement redux use typesafe-actions for action

Viewed 4640

I'm using typescript. I'm using typesafe-actions for redux action

My code is the following:

action

export const setCount = createAction(
  types.SET_COUNT,
  resolve => (dataCount: CountModel) => resolve({ dataCount }),
);

Expected 0 arguments, but got 1.ts(2554)

How can I fix it?

index.tsx

  const setCount = (values: CountModel) => {
    dispatch(action.setCount(values))
  }

The setCount function notice syntax error:

1 Answers
Related