Skip to content

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

Closed

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

Activity

  1. hanseartic commented on Sep 20, 2024

    @hanseartic
    Author

    Checked with latest release of @types/node. Still missing

  2. Renegade334 commented on Sep 21, 2024

    @Renegade334
    Contributor

    For reference, cleanup only actually exists on stream.promises.finished() and is currently misdocumented in Node. signal arises from the Abortable interface so should be present here – are you unable to assign it?

  3. hanseartic commented on Nov 11, 2024

    @hanseartic
    Author

    fixed per #70918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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