Creates batching function that returns results

  • Type Parameters

    • T
    • U

    Parameters

    • t: number

      Time window for batching

    • execute: (request: T[]) => U[] | Promise<U[]>

      Function to process batch

    Returns (request: T) => Promise<U>

    Function that returns promise of result