Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hanseartic opened this issue Sep 20, 2024 Discussed in #70164 · 2 comments

Comments

@hanseartic
Copy link

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

@hanseartic
Copy link
Author

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

@Renegade334
Copy link
Contributor

Renegade334 commented Sep 21, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants