typescript-fsa-redux-thunk icon indicating copy to clipboard operation
typescript-fsa-redux-thunk copied to clipboard

No error if no params to async action were passed

Open alxmiron opened this issue 4 years ago • 1 comments

In the main example from the readme, if I dispatch a login action without params, no errors will be thrown:

await store.dispatch(login());

because login action creator has optional params type (in some reason)

const login: ThunkFunction
   (params?: LoginParams | undefined) => ...

It seems like a bug. It's not type-safe. See a repro case here: https://codesandbox.io/s/typescript-mzr5r

alxmiron avatar Mar 21 '20 21:03 alxmiron

@xdave the issue may be solved.

septs avatar Aug 17 '20 06:08 septs