Defined in: async-debouncer.ts:6
Options for configuring an async debounced function
• TFn extends AnyAsyncFunction
• TArgs extends Parameters<TFn>
optional enabled: boolean;
optional enabled: boolean;
Defined in: async-debouncer.ts:14
Whether the debouncer is enabled. When disabled, maybeExecute will not trigger any executions. Defaults to true.
optional leading: boolean;
optional leading: boolean;
Defined in: async-debouncer.ts:19
Whether to execute on the leading edge of the timeout. Defaults to false.
optional onError: (error) => void;
optional onError: (error) => void;
Defined in: async-debouncer.ts:23
Optional error handler for when the debounced function throws
unknown
void
optional onExecute: (debouncer) => void;
optional onExecute: (debouncer) => void;
Defined in: async-debouncer.ts:27
Optional function to call when the debounced function is executed
AsyncDebouncer<TFn, TArgs>
void
optional trailing: boolean;
optional trailing: boolean;
Defined in: async-debouncer.ts:32
Whether to execute on the trailing edge of the timeout. Defaults to true.
wait: number;
wait: number;
Defined in: async-debouncer.ts:37
Delay in milliseconds to wait after the last call before executing Defaults to 0ms
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.