• Makes sure that events are emitted within ms. Otherwise emits an error.

    Type Parameters

    • T

    Parameters

    • ms: number

    Returns TransformStream<T, T>

    Throws

    TimeoutError

    Example

    readableStream
    .pipeThrough(timeout(1_000))
    .pipeTo(write())
    .catch(error => {
    // error is TimeoutError if any event took too long
    })

Generated using TypeDoc