Skip to content

No error if no params to async action were passed #26

@alxmiron

Description

@alxmiron

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions