Repository navigation
docs: add missing returns annotations in iter/*-each examples and fix thisArg description in iter/unique-by* - #16549
Draft
Planeshifter wants to merge 6 commits into
Draft
Planeshifter wants to merge 6 commits into
Planeshifter wants to merge 6 commits into
Conversation
Changed bare `// undefined` example annotations to `// returns undefined` in README.md, lib/index.js, and lib/main.js (`// returns` form used by 398 of 405 JSDoc example annotations across `iter`, 98%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD7AKe9sM3ib4tmcCTST
Changed bare `// undefined` example annotations to `// returns undefined` in README.md, lib/index.js, and lib/main.js (`// returns` form used by 398 of 405 JSDoc example annotations across `iter`, 98%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD7AKe9sM3ib4tmcCTST
Changed bare `// undefined` example annotations to `// returns undefined` in README.md, lib/index.js, and lib/main.js (`// returns` form used by 398 of 405 JSDoc example annotations across `iter`, 98%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD7AKe9sM3ib4tmcCTST
Changed bare `// undefined` example annotations to `// returns undefined` in lib/main.js (`// returns` form used by 398 of 405 JSDoc example annotations across `iter`, 98%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD7AKe9sM3ib4tmcCTST
Changed the `thisArg` JSDoc description in lib/main.js from "evaluation context" to "execution context", matching the package's README and repl.txt and 21 of 27 `iter` packages that accept `thisArg` (78%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD7AKe9sM3ib4tmcCTST
Changed the `thisArg` JSDoc description in lib/main.js from "evaluation context" to "execution context", matching the package's README and repl.txt and 21 of 27 `iter` packages that accept `thisArg` (78%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD7AKe9sM3ib4tmcCTST
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This branch has not been deployed
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
This pull request:
thisArgdescriptions in sixiterpackages to the conventions used by the rest of the namespace.Namespace summary.
iterhas 65 members, none autogenerated. Analyzed features: file tree,package.jsonkey sets, README section set/order, test/benchmark/example filenames, public signature, return kind, validation prologue, error construction, JSDoc shape, dependencies, example annotation form, andthisArgdescription. File trees,package.jsonkeys, and test/benchmark/example layout are 100% uniform. Excluded for lack of a 75% majority: iterator validation message wording (26 of 38 use "iterator protocol-compliant object", 68%) and return kind (47 of 65 return iterators, 72%).iter/do-until-each,iter/until-each,iter/while-eachReplaces the bare
// undefinedexample annotation with// returns undefinedinREADME.md,lib/index.js, andlib/main.js. 398 of 405 JSDoc example annotations initeruse the// returnsform (98%). The thirdit.next().valuecall in each example evaluates toundefined.iter/do-while-eachSame fix, in
lib/main.jsonly. The package's README andlib/index.jsalready use// returns undefined.iter/unique-by,iter/unique-by-hashChanges the
thisArgJSDoc description inlib/main.jsfrom "evaluation context" to "execution context". This matches each package's own README andrepl.txt, and 21 of the 27iterpackages that acceptthisArg(78%).Related Issues
None.
Reference Packages
This pull request followed these packages:
iter/do-while-each(README andlib/index.js)// returns undefinedannotation form.Questions
No.
Other
How this was checked. Structural features were extracted from every package, semantic features came from a per-package source read, and three independent reviews (semantic, cross-reference, structural) validated the result. With
// returns undefined, thestdlib/jsdoc-doctestlint rule now checks these annotations, and the value matches. Each example was also run with Node.Deliberately excluded:
// undefinedremains indocs/types/index.d.tsofuntil-each,while-each, anddo-while-each, and in the namespace-leveliter/docs/types/index.d.ts. TypeScript declarations were out of scope for this pass.thisArgwordings such as "callback execution context" inpop,shift,replicate-by, andstrided-bywere left alone. These wordings are common across stdlib and consistent within each package.## See Alsosections (tooling-populated) and empty## Notessections inlast,length, andnthwere left alone, because filling them needs package-specific prose.Errormessages withoutformatwere left alone. They conform tostdlib/no-unnecessary-format.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code as part of an automated cross-package API drift analysis.
Generated by Claude Code