Skip to content

Debounce async functions #898

Description

@throrin19

Hello,

It is possible to debounce an async function and return the result ? Actually If I test like that TS said the debounced function is not async :

// just a silly example, normally the debounced function return request result
const requestAction = debounce(
    async () => 1,
    1000,
);

const result = await requestAction(); // TS said requestAction is not async

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions