Skip to content

Allow Promise<void> as return type of function passed to enhance #15700

@Stadly

Description

@Stadly

The function passed to enhance is typed to return void:

}) => void

But it clearly accepts async functions.

Should it have been void | Promise<void>?

My linter says error Promise returned in function argument where a void return was expected @typescript-eslint/no-misused-promises.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions