From d0b9ca8867d5c51177bffc6fe7475eac3bd4c4af Mon Sep 17 00:00:00 2001 From: Eric Wyne Date: Fri, 22 Aug 2025 09:39:24 -0700 Subject: [PATCH] Enhance WorkflowStatus type to include returnValue for completed status --- src/client/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }; } }