@defer/client (deprecated helpers)
delay()
Deprecated
Prefer assignOptions()
as delay()
will be dropped in 2.0
.
The delay(deferFn, interval)
function takes a deferred function and applies a
custom scheduled_for
attribute. By default, the scheduled_for
is set to the
current time.
Example:
import { delay } from "@defer/client";
import { sayHello } from "./defer/sayHello";
const delayedSayHello = delay(sayHello, "1h");
await delayedSayHello("John Doe");
Was this page helpful?