feat: add TypeScript declarations for blas/base/igamax#12420
Merged
Conversation
Adds the missing `docs/types/index.d.ts` and `docs/types/test.ts` declarations for `blas/base/igamax`. The package's `package.json` already declares `"types": "./docs/types"` (pointing at a directory that did not exist), and the surrounding generic `g*` siblings under `blas/base/` (gasum, gaxpy, gcopy, gdot, gnrm2, gscal, gswap, gsyr, ggemv, gger, ggemm) all ship `docs/types/`. The index/`.ndarray` signature is modeled on the closest BLAS-`amax` sibling (`idamax`, `isamax`) and the input typing — `NumericArray | Collection<number> | AccessorArrayLike<number>` — is modeled on the closest generic sibling (`gasum`). Added missing `docs/types/index.d.ts` and `docs/types/test.ts` (present in 99% of siblings; 106/107 voted members).
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Jun 1, 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
Adds the missing
docs/types/index.d.tsanddocs/types/test.tsfiles for@stdlib/blas/base/igamax. The package'spackage.jsonalready declares"types": "./docs/types"— pointing at a directory that did not exist. This patch makes that pointer resolve.Namespace summary
@stdlib/blas/baseassert,ndarray,wasm— excluded).package.jsonshape (top-level keys,scripts,keywords),manifest.jsonshape, README H2/H3 sections, test/benchmark/example file naming, plus a fast cross-package scan for error-construction patterns inlib/main.js.package.jsonkeys (100%),manifest.jsonshape where present (100%),lib/,test/,examples/,docs/directories (100%),benchmark/directory (98%),docs/types/directory (99%),docs/repl.txt(98%),test/test.js(100%),examples/index.js(100%),benchmark/benchmark.js(97%), README## Usage/## Examples(100% / 98%), and error-construction (the 4 main files that throw all useformat).## Notes(79% — many small enum/resolver utilities legitimately do not need notes),binding.gyp/include.gypi/src// native-bindings cluster (~47-53% — split intentionally between native and pure-JS implementations),## C APIs(64%),## See Also(23%),## References(7%).blas/base/igamaxigamaxis the lone outlier on thedocs/types/feature (106/107 = 99% conformance). The package's ownpackage.jsondeclares"types": "./docs/types", but the directory does not exist; every other genericg*sibling (gasum,gaxpy,gcopy,gdot,ggemm,ggemv,gger,gnrm2,gscal,gswap,gsyr) ships one. The addedindex.d.tsadoptsgasum's generic input typing —NumericArray | Collection<number> | AccessorArrayLike<number>— becauseigamaxaccepts any numeric array. The signature surface mirrors the existingidamax/isamaxdeclarations (the closesti*amaxsiblings): aRoutineinterface with the 3-arg main overload and the 4-arg.ndarrayoverload, both returningnumber. Thetest.tsexercises both overloads againstFloat64ArrayandAccessorArray, with$ExpectErrorcoverage for argument-type and arity mismatches matching the sibling conventions.Validation
Checked:
format-conformance signal made the wider semantic sweep unnecessary.confirmed-drift.blas/base/igamax.blas/base/igamax/reference the absence ofdocs/types/; the README's documented signatures (igamax( N, x, strideX )andigamax.ndarray( N, x, strideX, offsetX ), both returning an index) match the declarations exactly.Deliberately excluded:
blas/base/drotgandblas/base/srotg(missing## ExamplesH2 inside the<section class="examples">wrapper) — dropped on open-PR collision (PRs feat: addblas/base/zrotg#9628, feat: add C and Fortran implementation ofblas/base/drotg#9592, feat: add C / Fortran implementation forblas/base/drotg#2264, feat: adds Fortran and C implementation ofblas/base/srotg#9537, feat: add C and Fortran implementation forblas/base/srotg#987 all touch these packages).blas/base/dgemm,sgemm,ggemm(missingbenchmark/benchmark.js) — intentional deviation: each ships ~40 parameter-variant benchmarks instead of a canonical entry; the structure reflects matrix-matrix multiply's parameter space, not drift.## Notesoutliers (22 packages, most enum/resolve utilities) — feature falls just above the 75% threshold and the outlier cohort is a coherent semantic subset, not drift.Related Issues
None.
Questions
No.
Other
Generated by an automated cross-package drift-detection run (random-pick namespace selection; full per-feature distribution and dropped-candidate log live in the local report). The diff is mechanical: two new files, no edits to existing code, no observable behavior change.
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 an automated cross-package drift-detection routine. The drift was identified by structural feature extraction across
@stdlib/blas/base/; the proposed fix was validated by parallel cross-reference and structural-review subagents (bothconfirmed-drift); the.d.tsand.tscontent was generated by modeling on the existingblas/base/gasum/docs/types/(generic input typing) andblas/base/idamax/docs/types/(index-returningRoutineinterface) siblings.@stdlib-js/reviewers
Generated by Claude Code