Skip to content

docs: correct applyEach callback placement - #2117

Open
Aurantium-47 wants to merge 1 commit into
caolan:masterfrom
Aurantium-47:docs/apply-each-returned-callback
Open

Aurantium-47 wants to merge 1 commit into
caolan:masterfrom
Aurantium-47:docs/apply-each-returned-callback

Conversation

@Aurantium-47

Copy link
Copy Markdown

The generated signatures still show applyEach(fns, ...args, callback) and applyEachSeries(fns, ...args, callback), although since v3 the callback belongs to the returned function. The applyEach description also still describes the old partial-application behavior. Following those signatures returns a function without starting the tasks, as reported in #1658 and #1694.

Remove the factory's callback parameter from both JSDoc entries, explain the returned function's callback and Promise forms, and add a Promise example. Runtime code is unchanged.

Validation:

  • Existing applyEach tests: 8 passing, including callback, cancellation, native async functions, and Promise usage for both methods.
  • ESLint for both changed files passed.
  • Generated the documentation with the repository's JSDoc configuration and checked that both signatures contain only fns and ...args.
  • Ran the callback and Promise forms against the public API and confirmed the functions execute only after calling the returned function.

AI assistance: OpenAI Codex helped prepare and verify this documentation change.

Assisted-by: OpenAI GPT-6 <noreply@openai.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant