Skip to content

docs: fix TSDoc issues in several math/base/tools declarations#12464

Merged
kgryte merged 1 commit into
developfrom
philipp/docs-fix-base-tools-declarations
Jun 3, 2026
Merged

docs: fix TSDoc issues in several math/base/tools declarations#12464
kgryte merged 1 commit into
developfrom
philipp/docs-fix-base-tools-declarations

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request corrects documentation-only issues in TypeScript declaration files across the @stdlib/math/base/tools namespace, flagged by an audit:

  • chebyshev-series / chebyshev-seriesf — remove the misleading inline // 1*T_0(1/2) + 0.5*T_1(1/2) example comments, which evaluate to 1.25 and contradict the correct // returns 0.75 annotations (the coefficients are stored in descending-degree order with constant-term half-weighting). Also drop the result-style comment misplaced on the factory(...) construction line, which returns an evaluator function rather than a value.
  • evalrational / evalrationalf — correct off-by-one polynomial-degree labels in the examples (a degree-3 polynomial was labeled "degree 4"; a degree-1 polynomial "degree 2").
  • hermitepoly / normhermitepoly / normhermitepolyf — add the "nonnegative" qualifier to the factory method's @param n, matching the call-signature @param n in the same file.

This PR addresses only the TypeScript declaration files. (The audit also noted some optional cross-package wording/alias-naming polish in this namespace; those purely-cosmetic items are intentionally left out.)

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?

Found via a TypeScript-declaration audit of the @stdlib/math namespace.

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.

These issues were identified by an automated TypeScript-declaration audit run with Claude Code, and the fixes were prepared by Claude Code under my review.


@stdlib-js/reviewers

Correct documentation-only issues flagged by an audit of the
`@stdlib/math/base/tools` namespace:

- `chebyshev-series` / `chebyshev-seriesf`: remove the misleading inline
  `// 1*T_0(1/2) + 0.5*T_1(1/2)` example comments, which evaluate to
  1.25 and contradict the correct `// returns 0.75` annotations (the
  coefficients are stored in descending-degree order with constant-term
  half-weighting). Also drop the result-style comment misplaced on the
  `factory(...)` construction line, which returns an evaluator function.
- `evalrational` / `evalrationalf`: correct off-by-one polynomial-degree
  labels in the examples (a degree-3 polynomial was labeled "degree 4"
  and a degree-1 polynomial "degree 2").
- `hermitepoly` / `normhermitepoly` / `normhermitepolyf`: add the
  "nonnegative" qualifier to the `factory` method's `@param n` so it
  matches the call-signature `@param n` in the same file.

This PR addresses only the TypeScript declaration files.

---
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
---
@stdlib-bot stdlib-bot added the Math Issue or pull request specific to math functionality. label Jun 2, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/tools/chebyshev-series $\color{green}280/280$
$\color{green}+100.00\%$
$\color{green}20/20$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}280/280$
$\color{green}+100.00\%$
math/base/tools/chebyshev-seriesf $\color{green}300/300$
$\color{green}+100.00\%$
$\color{green}20/20$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}300/300$
$\color{green}+100.00\%$
math/base/tools/evalrational $\color{green}398/398$
$\color{green}+100.00\%$
$\color{green}39/39$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}398/398$
$\color{green}+100.00\%$
math/base/tools/evalrationalf $\color{green}406/406$
$\color{green}+100.00\%$
$\color{green}39/39$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}406/406$
$\color{green}+100.00\%$
math/base/tools/hermitepoly $\color{green}202/202$
$\color{green}+100.00\%$
$\color{green}12/12$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}202/202$
$\color{green}+100.00\%$
math/base/tools/normhermitepoly $\color{green}226/226$
$\color{green}+100.00\%$
$\color{green}27/27$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}226/226$
$\color{green}+100.00\%$
math/base/tools/normhermitepolyf $\color{green}230/230$
$\color{green}+100.00\%$
$\color{green}27/27$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}230/230$
$\color{green}+100.00\%$

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

@Planeshifter Planeshifter changed the title docs: fix TSDoc issues in several @stdlib/math/base/tools declarations docs: fix TSDoc issues in several math/base/tools declarations Jun 3, 2026
@kgryte kgryte marked this pull request as ready for review June 3, 2026 08:08
@kgryte kgryte requested a review from a team June 3, 2026 08:08
@kgryte kgryte merged commit cb58c26 into develop Jun 3, 2026
39 checks passed
@kgryte kgryte deleted the philipp/docs-fix-base-tools-declarations branch June 3, 2026 08:08
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Math Issue or pull request specific to math functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants