# batcher | Welshman Docs
Documentation for Welshman Docs

# Function batcher

Creates batching function that returns results

- batcher< T , U >(
  t: number,
  execute: (request: T []) => U [] | Promise< U []>,
  ): (request: T ) => Promise< U >

- #### 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

  - Defined in packages/lib/src/Tools.ts:880