Skip to content

docs: add JSDoc examples - #15948

Merged
kgryte merged 2 commits into
developfrom
claude/cool-johnson-bo1t3v
Oct 12, 2026
Merged

kgryte merged 2 commits into
developfrom
claude/cool-johnson-bo1t3v

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • adds the missing @example tags to the primary JSDoc in math/base/special/gammaincinv/lib/main.js, the only package in the namespace without them.

math/base/special/gammaincinv

lib/main.js ended its JSDoc at @returns with no @example tags, unlike 382 of 383 packages in math/base/special (99.7%). The added examples mirror those already in lib/index.js, the README, and docs/repl.txt, and follow the one-example-per-tag style used in gammainc and betaincinv. Doc-only; no behavior change.

Related Issues

Does this pull request have any related issues?

None.

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.

Namespace summary. math/base/special has 383 member packages (fast was left out because it is a namespace package). I compared 14 features: file tree, package.json keys, scripts keys, manifest.json keys, README section set and order, return kind, how errors are built, whether main.js has an @example, whether @returns and @param tags have descriptions, whether @param tags match the signature, @throws tags, and the @example and @module tags in lib/index.js. 12 of them had a clear majority (at least 75% of packages); the two lib/index.js tag features did not, so I left them out.

Validation. Structural features came from a filesystem pass. Semantic features came from parallel agents that read lib/main.js, lib/index.js, and lib/validate.js. The finding was then reviewed twice: once to judge intent from the source, and once to check whether tests, docs, or stdlib/jsdoc-doctest depend on the current state. All six example values were checked against the implementation (1.6783…, 6.2213…, 3.9204…, 1.7273…, NaN, NaN).

Left out on purpose:

  • packages that genuinely differ: non-native packages lacking gypfile or C API README sections, and rempio2, rempio2f, and kernel-sincos, which write into an output argument;
  • signature and tag mismatches that were only an artifact of the [name=default] bracket syntax;
  • the native C benchmarks in hyp2f1 and sqrtpif that sit under benchmark/c/ instead of benchmark/c/native/, which open PR bench: clean-up #15934 already fixes.

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

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was written primarily by Claude Code, as part of an automated check that compares packages within a namespace for consistency.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01LDgawJ2nLhuTjXQGz1yUku


Generated by Claude Code

Added missing `@example` tags to the primary JSDoc in `lib/main.js` (present in 382 of 383 packages in `math/base/special`, 99.7%). Examples mirror those already documented in `lib/index.js`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LDgawJ2nLhuTjXQGz1yUku
@stdlib-bot stdlib-bot added the Math Issue or pull request specific to math functionality. label Oct 7, 2026
@stdlib-bot

stdlib-bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/gammaincinv $\\color{red}1671/1896$
$\\color{green}+0.00\\%$
$\\color{red}129/160$
$\\color{green}+0.00\\%$
$\\color{red}16/24$
$\\color{green}+0.00\\%$
$\\color{red}1671/1896$
$\\color{green}+0.00\\%$

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

@kgryte kgryte added the Documentation Improvements, additions, or changes to documentation. label Oct 12, 2026
@kgryte
kgryte marked this pull request as ready for review October 12, 2026 12:50
@kgryte
kgryte requested a review from a team October 12, 2026 12:50
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 12, 2026
Comment thread lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/main.js Outdated
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte kgryte changed the title docs: add JSDoc examples to math/base/special/gammaincinv docs: add JSDoc examples Oct 12, 2026
@kgryte
kgryte merged commit 01425e2 into develop Oct 12, 2026
12 checks passed
@kgryte
kgryte deleted the claude/cool-johnson-bo1t3v branch October 12, 2026 13:05
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements, additions, or changes to documentation. Math Issue or pull request specific to math functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants