Skip to content

Commit fb3844b

Browse files
committed
docs: fix wait.for() idempotency example to use a single options object
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.
1 parent 5667461 commit fb3844b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/wait-for.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ You can pass an idempotency key to any wait function, allowing you to skip waits
3838

3939
```ts
4040
// Specify the idempotency key and TTL when waiting for a duration:
41-
await wait.for({ seconds: 10 }, { idempotencyKey: "my-idempotency-key", idempotencyKeyTTL: "1h" });
41+
await wait.for({ seconds: 10, idempotencyKey: "my-idempotency-key", idempotencyKeyTTL: "1h" });
4242
```

0 commit comments

Comments
 (0)