docs: fix @throws annotation in blas/ext/one-to and blas/ext/zero-to#12266
Merged
Conversation
Align the `@throws` JSDoc tag for "must provide valid options" with the
namespace convention used by 14 of 16 sibling packages in `blas/ext/`
(87.5% conformance), as well as the same package's own `lib/base.js`,
which already documents the case as `@throws {Error}`. Touches
`lib/main.js` and `lib/assign.js`; no runtime change.
Align the `@throws` JSDoc tag for "must provide valid options" with the
namespace convention used by 14 of 16 sibling packages in `blas/ext/`
(87.5% conformance), as well as the same package's own `lib/base.js`,
which already documents the case as `@throws {Error}`. Touches
`lib/main.js` and `lib/assign.js`; no runtime change.
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
May 24, 2026
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:
@throwsJSDoc tag for the "must provide valid options" case in twoblas/ext/packages whoselib/main.jsandlib/assign.jsdeviate from the namespace convention (14 of 16 sibling packages document the case as@throws {Error}, and the same packages' ownlib/base.jsfiles already use@throws {Error})Namespace summary
@stdlib/blas/extbase, which is a sub-namespace aggregator)package.jsonshape,manifest.jsonshape, README section structure,<section>boilerplate,errorConstruction == "format",hasExample,@throws {Error} must provide valid optionspublicSignature,validationPrologue,dependencies, keyword sets (each package's math/search semantics differ),lib/assign.js/lib/base.jspresence (mutating-vs-non-mutating and factory-vs-manual architectures are intentional)blas/ext/one-toCorrects the
@throwsannotation for the "invalid options" case inlib/main.jsandlib/assign.jsfrom{TypeError}to{Error}, aligning withlib/base.jswithin the same package and with 87.5% of sibling packages inblas/ext/. No runtime behavior changes; existing tests continue to assert onTypeErroras thrown.blas/ext/zero-toCorrects
@throws {TypeError}to@throws {Error}for the "must provide valid options" JSDoc annotation inlib/main.jsandlib/assign.js, bringing the package in line withlib/base.jsand 14 of 16 sibling packages inblas/ext/(87.5%). The deviation was a documentation inconsistency only; no runtime behavior changes, and existing tests continue to assert the thrownTypeErroras before.Related Issues
No.
Questions
No.
Other
Validation
package.jsonshapes, README sections, test/benchmark/example filenames,manifest.jsonshapes).confirmed-driftfor all four files. No outlier on this feature was markedintentional-deviationorneeds-human.Deliberately excluded
blaskeyword at 62.5%).circshift,sort,sorthp) correctly lack.assigninfrastructure;sumcorrectly uses a factory that packages both forms;to-sorted/to-sortedhpcorrectly delegate to their mutating counterparts.find-index,find-last-index,index-of,last-index-of— these are search functions, not math operations.docs/repl.txt,docs/types/*.d.ts).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of a cross-package API drift detection routine: structural and semantic features were extracted from every package in
@stdlib/blas/ext/, the majority pattern per feature was computed (≥75% threshold), and outliers were validated by three independent review agents before the patches were applied.Generated by Claude Code