@adviser/cement - v0.0.0
    Preparing search index...

    Type Alias ChunkyAsyncOptions<T>

    ChunkyAsyncOptions: ChunkyBaseOptions<T> & {
        commit(chunked: T[]): Promise<void>;
    }

    Configuration options for asynchronous chunky processing. Supports infinite iterables - each chunk is awaited before consuming the next item.

    Type Parameters

    • T

      The type of items in the input iterable

    Type Declaration

    • commit: function
      • Asynchronous function called to process each chunk. Each commit is awaited before the next item is consumed from the input.

        Parameters

        • chunked: T[]

          The chunk to commit

        Returns Promise<void>

        Promise that resolves when the chunk is processed

        commit: async (chunk) => { await saveToDatabase(chunk) }