docs: add missing @throws tags to @stdlib/streams/node/split constructor#12748
Draft
Planeshifter wants to merge 1 commit into
Draft
docs: add missing @throws tags to @stdlib/streams/node/split constructor#12748Planeshifter wants to merge 1 commit into
@throws tags to @stdlib/streams/node/split constructor#12748Planeshifter wants to merge 1 commit into
Conversation
…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).
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
@throws {TypeError}JSDoc tags to theSplitStreamconstructor in@stdlib/streams/node/split/lib/main.js, documenting theTypeErrorinstances rethrown from the in-constructorvalidate( opts, options )call.streams/node/splitSplitStreamrethrows theTypeErrorreturned byvalidate( opts, options ), but its constructor JSDoc declared no@throwstags. Addedoptions argument must be an objectandmust provide valid options, matching the wording already used in this package'slib/object_mode.jsandlib/factory.js. 100% conformance with the 12 other factory constructors in@stdlib/streams/nodethat follow the validate-then-throw pattern.Related Issues
No.
Questions
No.
Other
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
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was drafted by Claude Code as part of a cross-package API drift audit of the
@stdlib/streams/nodenamespace: structural and JSDoc features were extracted across all 16 members, a single high-signal outlier was identified (split'sSplitStreamconstructor missing@throwstags 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