Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
variable batch
import { batch } from "https://deno.land/x/gamla@91.0.0/src/io.ts";

Queues the execute function until the condition is met or maxWaitTime has passed. Once one of the above happens we flush the queue and run the execute functions

type

<TaskKey extends string | number | symbol, TaskInput, Output>(
keyFn: (_: TaskInput) => TaskKey,
maxWaitMilliseconds: number,
execute: Executor<TaskInput, Output>,
condition: (_: TaskInput[]) => boolean,
) => unknown