diff --git a/types/defines/rpc.d.ts b/types/defines/rpc.d.ts index 284a940b87f..7e1bdbda247 100644 --- a/types/defines/rpc.d.ts +++ b/types/defines/rpc.d.ts @@ -225,11 +225,22 @@ declare module "cloudflare:workers" { }; export type WorkflowStep = { - do: ( - name: string, - callback: () => Promise, - config?: WorkflowStepConfig - ) => Promise; + do: + | (( + name: string, + callback: () => Promise + ) => Promise) + | (( + name: string, + config: WorkflowStepConfig, + callback: () => Promise + ) => Promise) + | (( + name: string, + config: WorkflowStepConfig | (() => Promise), + callback?: () => Promise + ) => Promise); + sleep: (name: string, duration: WorkflowSleepDuration) => Promise; };