docs: fix wait.for() idempotency example to use a single options object#4021
docs: fix wait.for() idempotency example to use a single options object#4021crubn wants to merge 1 commit into
Conversation
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.
|
|
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. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe documentation example for ✨ Finishing Touches🧪 Generate unit tests (beta)
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
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. Comment |
Documentation-only change; no runtime code paths are affected. Verified against the
SDK source rather than executed:
packages/trigger-sdk/src/v3/wait.ts:394
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:
Closes #<issue>line since there's no associated issue (it's aspotted docs typo). If you'd rather file a quick issue first and link it, I can draft
that too.
for a trivial docs change — it requires no changeset (docs-only, no package version
bump). If you want, I can read
CONTRIBUTING.mdto confirm there's nothing extrabefore you submit