Expand description
interface DebounceConstructor<TFn> {
disregardExecutionTime?: boolean;
fn: TFn;
interval: number;
}Properties§
§§§
disregard Execution Time?: booleanBy 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: TFnFunction to be debounced
interval: numberMinimum interval between each call
Setting this to <= 0 will make the debounce function a pure pass-through, not actually debouncing the function
Options to construct a debounce function