Skip to content

docs: fix and align TSDoc comments in iter declarations#12726

Merged
kgryte merged 1 commit into
developfrom
philipp/iter-ts-declarations-docs
Jun 10, 2026
Merged

docs: fix and align TSDoc comments in iter declarations#12726
kgryte merged 1 commit into
developfrom
philipp/iter-ts-declarations-docs

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Jun 9, 2026

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request fixes documentation-only (TSDoc) defects and inconsistencies in the TypeScript declaration files of iter packages, surfaced by an audit of the namespace. No runtime behavior or emitted types change. Changes:

  • do-while-each: fix a malformed inline-code span (thus, fcn`thus, `fcn`) in the summary.
  • replicate-by: replace a stale, copy-pasted summary ("invokes a function for each iterated value") with the correct "replicates each iterated value according to a provided function".
  • pipeline-thunk: fix IteratorFunction @returns hash value@returns iterator function result (copy-paste from an unrelated function) and add the missing terminating period to its summary.
  • cusome-by: fix @param n from "minimum number of truthy elements" (the non-predicate cusome wording) to "minimum number of successful values" (n counts predicate-passing values, matching some-by).
  • dedupe-by: fix the Callback union doc block which named a nonexistent prev param and omitted the real sprev/dprev (now mirrors the maximal-arity Quinary member).
  • strided: document (default: false) for the optional eager param, matching the sibling strided-by and the implementation.
  • fill: document @param begin (default: 0), matching the sibling slice and the implementation.
  • datespace: remove a stray space in (default: 'floor' ) to match the first overload.
  • cusome: complete a truncated @example (// ..) with the family's closing done assertion (matching cuany/cuevery/cunone).
  • do-until-each: add the returns keyword to an @example annotation (// undefined// returns undefined) for consistency with every other annotation in the block.

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

One change aligns an outlier with its sibling family rather than fixing an outright error: the cusome example completion (replacing a // .. placeholder with the family's closing done assertion). Happy to drop it if reviewers consider it out of scope for a docs-fix PR.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

These changes were identified via a systematic audit of the iter namespace's TypeScript declarations and then re-checked against the broader namespace conventions. Two candidate findings were intentionally dropped after that re-check: removing the Predicate union @param tags in any-by (all -by siblings carry them, so removal would create an outlier) and adding index-argument @throws to to-array-view (only to-array-view-right documents these; fill/slice/strided omit them, so the sibling is the anomaly). The companion refactor: changes (helper-type renames and any/unknown alignment) are submitted as separate PRs.

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.

The TSDoc inconsistencies were surfaced by an AI-assisted audit (Claude Code) of the iter namespace declarations, and the fixes were drafted with Claude Code. Each finding was verified against the actual declaration files, implementations, and sibling-package conventions before applying; several candidate findings were discarded as false positives or convention violations.


@stdlib-js/reviewers

@stdlib-bot

stdlib-bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
iter/cusome-by $\color{red}236/239$
$\color{green}+0.00\%$
$\color{red}21/22$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{red}236/239$
$\color{green}+0.00\%$
iter/cusome $\color{green}212/212$
$\color{green}+0.00\%$
$\color{green}20/20$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}212/212$
$\color{green}+0.00\%$
iter/datespace $\color{green}332/332$
$\color{green}+0.00\%$
$\color{green}48/48$
$\color{green}+0.00\%$
$\color{green}5/5$
$\color{green}+0.00\%$
$\color{green}332/332$
$\color{green}+0.00\%$
iter/dedupe-by $\color{green}247/247$
$\color{green}+0.00\%$
$\color{green}32/32$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}247/247$
$\color{green}+0.00\%$
iter/do-until-each $\color{red}224/227$
$\color{green}+0.00\%$
$\color{red}22/23$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{red}224/227$
$\color{green}+0.00\%$
iter/do-while-each $\color{red}225/228$
$\color{green}+0.00\%$
$\color{red}21/22$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{red}225/228$
$\color{green}+0.00\%$
iter/fill $\color{green}218/218$
$\color{green}+0.00\%$
$\color{green}29/29$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}218/218$
$\color{green}+0.00\%$
iter/pipeline-thunk $\color{green}134/134$
$\color{green}+0.00\%$
$\color{green}10/10$
$\color{green}+0.00\%$
$\color{green}2/2$
$\color{green}+0.00\%$
$\color{green}134/134$
$\color{green}+0.00\%$
iter/replicate-by $\color{green}245/245$
$\color{green}+0.00\%$
$\color{green}25/25$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}245/245$
$\color{green}+0.00\%$
iter/strided $\color{green}254/254$
$\color{green}+0.00\%$
$\color{green}40/40$
$\color{green}+0.00\%$
$\color{green}4/4$
$\color{green}+0.00\%$
$\color{green}254/254$
$\color{green}+0.00\%$

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

@Planeshifter Planeshifter force-pushed the philipp/iter-ts-declarations-docs branch from b3c8833 to df3bd26 Compare June 9, 2026 05:21
---
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/iter-ts-declarations-docs branch from df3bd26 to 40d250d Compare June 9, 2026 05:27
@Planeshifter Planeshifter marked this pull request as ready for review June 9, 2026 05:33
@Planeshifter Planeshifter requested a review from a team June 9, 2026 05:33
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jun 9, 2026
@Planeshifter Planeshifter requested a review from kgryte June 9, 2026 05:33
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels Jun 10, 2026
@kgryte kgryte merged commit 47e2cbf into develop Jun 10, 2026
54 checks passed
@kgryte kgryte deleted the philipp/iter-ts-declarations-docs branch June 10, 2026 02: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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants