Skip to main content

Batch <T>

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

publicconstructor

  • new Batch<T>(index: number, items: readonly T[]): Batch<T>
  • Type parameters

    • T

    Parameters

    • index: number
    • items: readonly T[]

    Returns Batch<T>

Properties

publicreadonlyindex

index: number

publicreadonlyitems

items: readonly T[]

Accessors

publiclength

  • get length(): number
  • Returns number

Methods

publicstaticfrom

  • from<T>(iterable: Iterable<T, any, any>, size: number, predicate?: (value: T, index: number) => boolean): IteratorObject<Batch<T>, undefined, unknown>
  • Type parameters

    • T

    Parameters

    • iterable: Iterable<T, any, any>
    • size: number
    • optionalpredicate: (value: T, index: number) => boolean

      Returns IteratorObject<Batch<T>, undefined, unknown>

    publicstaticfromAsync

    • fromAsync<T>(iterable: Iterable<T, any, any> | AsyncIterable<T, any, any>, size: number, predicate?: (value: T, index: number) => boolean): AsyncIteratorObject<Batch<T>, undefined, unknown>
    • Type parameters

      • T

      Parameters

      • iterable: Iterable<T, any, any> | AsyncIterable<T, any, any>
      • size: number
      • optionalpredicate: (value: T, index: number) => boolean

        Returns AsyncIteratorObject<Batch<T>, undefined, unknown>