web-stream-kit
    Preparing search index...

    Type Alias MapFunction<I, O>

    MapFunction: (chunk: I, index: number) => O | Promise<O>

    Transformation function for mapping an incoming chunk to a new representation.

    Type Parameters

    • I

      The type of input chunk.

    • O

      The type of output chunk.

    Type Declaration

      • (chunk: I, index: number): O | Promise<O>
      • Parameters

        • chunk: I

          The item to transform.

        • index: number

          The zero-based sequential index of the item.

        Returns O | Promise<O>

        The transformed item or a Promise resolving to it.