Skip to content

docs: add missing @throws tags to @stdlib/streams/node/split constructor#12748

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/drift-streams-node-2026-06-10
Draft

docs: add missing @throws tags to @stdlib/streams/node/split constructor#12748
Planeshifter wants to merge 1 commit into
developfrom
philipp/drift-streams-node-2026-06-10

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

This pull request:

  • adds two missing @throws {TypeError} JSDoc tags to the SplitStream constructor in @stdlib/streams/node/split/lib/main.js, documenting the TypeError instances rethrown from the in-constructor validate( opts, options ) call.

streams/node/split

SplitStream rethrows the TypeError returned by validate( opts, options ), but its constructor JSDoc declared no @throws tags. Added options argument must be an object and must provide valid options, matching the wording already used in this package's lib/object_mode.js and lib/factory.js. 100% conformance with the 12 other factory constructors in @stdlib/streams/node that follow the validate-then-throw pattern.

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Pure documentation change; no runtime behavior, public signature, or test expectation is affected. The added tags duplicate the wording already shipped in the package's other public entry points (lib/object_mode.js, lib/factory.js).

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was drafted by Claude Code as part of a cross-package API drift audit of the @stdlib/streams/node namespace: structural and JSDoc features were extracted across all 16 members, a single high-signal outlier was identified (split's SplitStream constructor missing @throws tags despite the validate-then-throw body), and the fix was applied to bring it into line with the 12/13 sibling factory constructors that already document the same exceptions. All findings were reviewed by a human before being committed.


@stdlib-js/reviewers


Generated by Claude Code

…tructor

Added two `@throws {TypeError}` JSDoc tags to the `SplitStream`
constructor in `lib/main.js`. The constructor invokes `validate( opts,
options )` and rethrows the returned `TypeError` when `options` is not
a plain object or when an individual option fails validation, but the
JSDoc previously documented neither failure mode.

The added tags match the wording already present in the package's own
`lib/object_mode.js` and `lib/factory.js`, and bring the constructor
into line with the 12 sibling constructors in `@stdlib/streams/node`
that share the validate-then-throw pattern (100% conformance among
factory siblings).
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
streams/node/split $\\color{red}694/709$
$\\color{green}+97.88\\%$
$\\color{red}62/68$
$\\color{green}+91.18\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{red}694/709$
$\\color{green}+97.88\\%$

The above coverage report was generated for the changes in this PR.

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

Successfully merging this pull request may close these issues.

3 participants