Interface ChunkSource

An object that can generate chunks.

Hierarchy

  • ChunkSource

Implemented by

Properties

close?: (() => void)

Type declaration

    • (): void
    • Returns void

getChunk?: ((i) => Promise<undefined | Chunk>)

Type declaration

    • (i): Promise<undefined | Chunk>
    • Generate a chunk on-demand.

      Parameters

      • i: number

        chunk number, starting from zero.

      Returns Promise<undefined | Chunk>

      a Promise that resolves to requested chunk, or undefined if out of range.

listChunks: (() => AsyncIterable<Chunk>)

Type declaration

    • (): AsyncIterable<Chunk>
    • Generate chunks sequentially.

      Returns AsyncIterable<Chunk>

      an AsyncIterable of chunks in order.

Generated using TypeDoc