interface StreamOptions<T extends Stream> {
    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 Summary)

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

    Returns void

  • Parameters

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

    Returns void