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

The wait.for() idempotency example passed the idempotency options as a
second argument, but wait.for() takes a single options object — so the
second object was silently ignored and the key never applied. Merged the
fields into the single options object, matching the wait.until()
example.

Supersedes #4021.
This commit is contained in:
Iss
2026-06-25 09:50:59 -04:00
committed by GitHub
parent d565949205
commit f163c89143
+1 -1
View File
@@ -38,5 +38,5 @@ You can pass an idempotency key to any wait function, allowing you to skip waits
```ts
// Specify the idempotency key and TTL when waiting for a duration:
await wait.for({ seconds: 10 }, { idempotencyKey: "my-idempotency-key", idempotencyKeyTTL: "1h" });
await wait.for({ seconds: 10, idempotencyKey: "my-idempotency-key", idempotencyKeyTTL: "1h" });
```