Skip to content

docs: fix wait.for() idempotency example to use a single options object#4021

Closed
crubn wants to merge 1 commit into
triggerdotdev:mainfrom
crubn:docs/fix-wait-for-idempotency-example
Closed

docs: fix wait.for() idempotency example to use a single options object#4021
crubn wants to merge 1 commit into
triggerdotdev:mainfrom
crubn:docs/fix-wait-for-idempotency-example

Conversation

@crubn

@crubn crubn commented Jun 22, 2026

Copy link
Copy Markdown

Documentation-only change; no runtime code paths are affected. Verified against the
SDK source rather than executed:

  • wait.for() is defined as for: async (options: WaitForOptions) —
    packages/trigger-sdk/src/v3/wait.ts:394
  • WaitForOptions = WaitPeriod & CommonWaitOptions (wait.ts:358), and idempotencyKey /
    idempotencyKeyTTL are members of CommonWaitOptions (wait.ts:343)

So the idempotency keys must live in the single options object alongside the duration.
The corrected example mirrors the existing wait.until() example in
docs/wait-until.mdx.


Changelog

Docs: fixed the wait.for() idempotency example to pass
idempotencyKey/idempotencyKeyTTL inside the single options object (they were
previously passed as a second argument, which is silently ignored).


Screenshots

N/A — documentation text change only.

💯

Two notes:

  • I dropped the Closes #<issue> line since there's no associated issue (it's a
    spotted docs typo). If you'd rather file a quick issue first and link it, I can draft
    that too.
  • The CONTRIBUTING checkbox is checked on the assumption you're good with their guide
    for a trivial docs change — it requires no changeset (docs-only, no package version
    bump). If you want, I can read CONTRIBUTING.md to confirm there's nothing extra
    before you submit

wait.for() takes a single WaitForOptions object (WaitPeriod &
CommonWaitOptions), so idempotencyKey/idempotencyKeyTTL must go in the
same object as the duration. The example passed them as a second
argument, which is silently ignored — the idempotency key never applies.
This matches the wait.until() example and the section's own prose. No
behavior change.
@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fb3844b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Hi @crubn, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 755a9c42-9d6a-43aa-a3cf-de15e716bcd5

📥 Commits

Reviewing files that changed from the base of the PR and between 5667461 and fb3844b.

📒 Files selected for processing (1)
  • docs/wait-for.mdx

Walkthrough

The documentation example for wait.for idempotency is updated so that idempotencyKey and idempotencyKeyTTL are passed as part of the first options object (alongside the duration), rather than as a separate second argument.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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