interface StreamOptions<T> {
    autoDestroy?: boolean;
    emitClose?: boolean;
    highWaterMark?: number;
    objectMode?: boolean;
    signal?: AbortSignal;
    construct?(this: T, callback: ((error?: null | Error) => void)): void;
    destroy?(this: T, error: null | Error, callback: ((error?: null | Error) => void)): void;
}

Type Parameters

Hierarchy (view full)

Properties

autoDestroy?: boolean
emitClose?: boolean
highWaterMark?: number
objectMode?: boolean
signal?: AbortSignal

When provided the corresponding AbortController can be used to cancel an asynchronous action.

Methods

  • Parameters

    • this: T
    • callback: ((error?: null | Error) => void)
        • (error?): void
        • Parameters

          • Optionalerror: null | Error

          Returns void

    Returns void

  • Parameters

    • this: T
    • error: null | Error
    • callback: ((error?: null | Error) => void)
        • (error?): void
        • Parameters

          • Optionalerror: null | Error

          Returns void

    Returns void