@ekim088/toolkit
    Preparing search index...

    Type Alias DebouncedFn<T>

    DebouncedFn: (...args: Parameters<T>) => void & {
        cancel(): void;
        flush(): ReturnType<T> | undefined;
    }

    Type Parameters

    • T extends (...args: any) => unknown

    Type Declaration

      • (...args: Parameters<T>): void
      • Parameters

        • ...args: Parameters<T>

        Returns void

    • cancel: function
      • Cancels any pending invocation without calling the function.

        Returns void

    • flush: function
      • Immediately invokes any pending call and cancels the timer.

        Returns ReturnType<T> | undefined

        The return value of the pending call, or undefined if none was pending.