Defined in: throttler.ts:6
Options for configuring a throttled function
• TFn extends AnyFunction
• TArgs extends Parameters<TFn>
optional enabled: boolean;
optional enabled: boolean;
Defined in: throttler.ts:14
Whether the throttler is enabled. When disabled, maybeExecute will not trigger any executions. Defaults to true.
optional leading: boolean;
optional leading: boolean;
Defined in: throttler.ts:19
Whether to execute on the leading edge of the timeout. Defaults to true.
optional onExecute: (throttler) => void;
optional onExecute: (throttler) => void;
Defined in: throttler.ts:23
Callback function that is called after the function is executed
Throttler<TFn, TArgs>
void
optional trailing: boolean;
optional trailing: boolean;
Defined in: throttler.ts:28
Whether to execute on the trailing edge of the timeout. Defaults to true.
wait: number;
wait: number;
Defined in: throttler.ts:32
Time window in milliseconds during which the function can only be executed once
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.