Skip to content

Commit d39145d

Browse files
committed
Defer migration guide: string not a date in the payload
1 parent 8886bb7 commit d39145d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/v3/migration-defer.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ There will be a nice way to do this soon when you call `trigger()` but for now y
118118
```ts
119119
export const helloWorld = task({
120120
id: "hello-world",
121-
run: async (payload: { delayUntil?: Date; delayForSeconds?: number }) => {
121+
run: async (payload: { delayUntil?: string; delayForSeconds?: number }) => {
122122
if (payload.delayUntil) {
123-
await wait.until({ date: payload.delayUntil });
123+
await wait.until({ date: new Date(payload.delayUntil) });
124124
}
125125

126126
if (payload.delayForSeconds) {

0 commit comments

Comments
 (0)