pure
    Preparing search index...

    Type Alias DebounceConstructor<TFn>

    Options for debounce function

    type DebounceConstructor<TFn> = {
        disregardExecutionTime?: boolean;
        fn: TFn;
        interval: number;
    }

    Type Parameters

    • TFn
    Index

    Properties

    disregardExecutionTime?: boolean

    By default, the debouncer takes in account the time the underlying function executes. i.e. the actual debounce interval is max(interval, executionTime). This default behavior guanrantees that no 2 calls will be executed concurrently.

    If you want the debouncer to always debounce at the set interval, set this to true.

    fn: TFn

    Function to be debounced

    interval: number

    Minimum interval between each call

    Setting this to <= 0 will make the debounce function a pure pass-through, not actually debouncing the function