Skip to content

[@types/node] stream.finished method accepts incomplete set of properties to options object #70621

@hanseartic

Description

@hanseartic

Discussed in #70164

Originally posted by hanseartic July 29, 2024
FinishedOptions accepted by stream.finished(stream, options, callback) are missing properties from documentation.

interface FinishedOptions extends Abortable {
    error?: boolean | undefined;
    readable?: boolean | undefined;
    writable?: boolean | undefined;
}

signal and cleanup options

  • signal <AbortSignal> allows aborting the wait for the stream finish. The underlying stream will not be aborted if the signal is aborted. The callback will get called with an AbortError. All registered listeners added by this function will also be removed.
  • cleanup <boolean> remove all registered stream listeners. Default: false.

are missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions