Expand description
interface BatchConstructor<TFn extends AnyFn> {
batch: (args: Parameters<TFn>[]) => Parameters<TFn>;
disregardExecutionTime?: boolean;
fn: TFn;
interval: number;
unbatch?: (
inputs: Parameters<TFn>[],
output: AwaitRet<TFn>,
) => AwaitRet<TFn>[];
}Properties§
§§§§§
batch: { ... }Function to batch the inputs across multiple calls
disregard Execution Time?: booleanSame as that for DebounceConstructor
fn: TFnFunction to be wrapped
interval: numberInterval between each batched call
unbatch?: { ... }If provided, unbatch the output according to the inputs, so each call receives its own output.
By default, each input will receive the same output from the batched call
Options to construct a batch function