diff --git a/src/client/index.ts b/src/client/index.ts index 37340f4..5df0c7f 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -145,7 +145,7 @@ export type WorkflowDefinition< export type WorkflowStatus = | { type: "inProgress"; running: OpaqueIds[] } - | { type: "completed" } + | { type: "completed"; returnValue: unknown } | { type: "canceled" } | { type: "failed"; error: string }; @@ -249,7 +249,7 @@ export class WorkflowManager { case "failed": return { type: "failed", error: workflow.runResult.error }; case "success": - return { type: "completed" }; + return { type: "completed", returnValue: workflow.runResult.returnValue }; } }