Hi,
creating a function with TypeScript will end in some type check "errors" for the parameters:

Are there TS type definitions for at least a few of the parameters (like dispatch, history, ...). Option and StateOfDispatch are types which has to be defined in the specific application, isn't it?
Actual you have to define the type definition by your own:

Or use a // @ts-ignore to ignore the errors.