Skip to content

docs: fix typos and copy-paste errors in stats TypeScript declarations#12482

Merged
kgryte merged 8 commits into
developfrom
philipp/stats-ts-docs-fixes
Jun 3, 2026
Merged

docs: fix typos and copy-paste errors in stats TypeScript declarations#12482
kgryte merged 8 commits into
developfrom
philipp/stats-ts-docs-fixes

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request fixes documentation-only issues in hand-written TypeScript declaration files (docs/types/index.d.ts) across the stats namespace, surfaced by a systematic audit of the namespace's .d.ts files. All changes are confined to comments (TSDoc summaries, @param/@returns/@throws text, @example blocks, and ## Notes prose); no function signatures, types, or exports were modified.

Highlights:

  • Fix typos and garbled prose (e.g. b = < 0b < 0, "an maximum support" → "and maximum support", "along roes" → "along rows").
  • Correct copy-paste errors where a summary/@example referenced the wrong distribution or operation (e.g. gumbel/logistic mgf summaries naming the "Gamma distribution", kumaraswamy logpdf naming the "Arcsine distribution", padjust documenting holm as "Hommel's method").
  • Align @param names and descriptions with their signatures (e.g. mgf @param x@param t; negative-binomial statistic @param r "failures" → "successes"; binomial/arcsine quantile probability args).
  • Fix @example issues (paired ttest example now passes y; var y redeclarations changed to reassignment; corrected // returns annotations such as ~-1.938~-1.941).
  • Normalize wording/formatting drift across sibling families (e.g. "natural logarithm", mgf block-comment terminator alignment, Unicode λ/σlambda/sigma in Notes).

Note: this PR intentionally edits only the underlying package declaration files; the generated namespace-root aggregator docs/types/index.d.ts files are not hand-edited and will regenerate from these sources. Findings that require actual declaration changes (parameter renames in signatures, type fixes, a logpdflogpmf method rename, a missing dcorrelation export, etc.) are intentionally excluded and will be submitted as separate per-package PRs.

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.

No.

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 prepared with Claude Code: an agent audited the stats namespace TypeScript declarations, and per-file agents applied the verified documentation-only fixes. Each finding was independently verified against the source file before editing. The changes were reviewed by myself prior to submission.


@stdlib-js/reviewers

@Planeshifter Planeshifter requested a review from a team June 3, 2026 04:43
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Jun 3, 2026
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
@Planeshifter Planeshifter force-pushed the philipp/stats-ts-docs-fixes branch from 284f244 to bd917b9 Compare June 3, 2026 04:49
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

No coverage information available.

@kgryte kgryte removed the Needs Review A pull request which needs code review. label Jun 3, 2026
@@ -31,15 +31,15 @@ type Unary = ( x: number ) => number;
*/
interface LogPDF {
/**
* Evaluates the natural logarithm of the probability density function (PDF) for an inverse gamma distribution with shape parameter `alpha` and scale parameter `beta` at a value `x`.
* Evaluates the natural logarithm of the probability density function (PDF) for an inverse gamma distribution with shape parameter `alpha` and rate parameter `beta` at a value `x`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Planeshifter I'm confused. In invgamma/cdf above, you changed scale to rate, and now in this package for invgamma/logpdf you are changing rate to scale. Which is it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Wikipedia, this should be scale. There are several other packages in invgamma which also need updating.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread lib/node_modules/@stdlib/stats/incr/mgrubbs/docs/types/index.d.ts Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/stats/incr/mgrubbs/docs/types/index.d.ts Outdated
Comment thread lib/node_modules/@stdlib/stats/midrange-by/docs/types/index.d.ts
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/stats/base/dists/invgamma/logpdf/docs/types/index.d.ts Outdated
Comment thread lib/node_modules/@stdlib/stats/base/dists/invgamma/logpdf/docs/types/index.d.ts Outdated
Comment thread lib/node_modules/@stdlib/stats/base/dists/invgamma/logpdf/docs/types/index.d.ts Outdated
Comment thread lib/node_modules/@stdlib/stats/base/dists/invgamma/logpdf/docs/types/index.d.ts Outdated
Comment thread lib/node_modules/@stdlib/stats/base/dists/invgamma/logpdf/docs/types/index.d.ts Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Copy link
Copy Markdown
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after a fair amount of clean-up.

@kgryte kgryte added the Documentation Improvements, additions, or changes to documentation. label Jun 3, 2026
@kgryte
Copy link
Copy Markdown
Member

kgryte commented Jun 3, 2026

As the CI failure is expected, I'll go ahead and merge.

@kgryte kgryte merged commit f59b324 into develop Jun 3, 2026
28 of 29 checks passed
@kgryte kgryte deleted the philipp/stats-ts-docs-fixes branch June 3, 2026 07:12
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. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants