Defined in: async-debouncer.ts:6
Options for configuring an async debounced function
• TFn extends AnyAsyncFunction
optional enabled: boolean;
optional enabled: boolean;
Defined in: async-debouncer.ts:11
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:16
Whether to execute on the leading edge of the timeout. Defaults to false.
optional onError: (error, debouncer) => void;
optional onError: (error, debouncer) => void;
Defined in: async-debouncer.ts:20
Optional error handler for when the debounced function throws
unknown
AsyncDebouncer<TFn>
void
optional onSettled: (debouncer) => void;
optional onSettled: (debouncer) => void;
Defined in: async-debouncer.ts:24
Optional callback to call when the debounced function is executed
AsyncDebouncer<TFn>
void
optional onSuccess: (result, debouncer) => void;
optional onSuccess: (result, debouncer) => void;
Defined in: async-debouncer.ts:28
Optional callback to call when the debounced function is executed
ReturnType<TFn>
AsyncDebouncer<TFn>
void
optional trailing: boolean;
optional trailing: boolean;
Defined in: async-debouncer.ts:33
Whether to execute on the trailing edge of the timeout. Defaults to true.
wait: number;
wait: number;
Defined in: async-debouncer.ts:38
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.