diff --git a/Workflow/Sources/RenderContext.swift b/Workflow/Sources/RenderContext.swift index b4f2a4aa6..8f7695974 100644 --- a/Workflow/Sources/RenderContext.swift +++ b/Workflow/Sources/RenderContext.swift @@ -148,4 +148,11 @@ extension RenderContext { } } } + + /// Generates a sink that allows sending the Workflow's output wrapped in an AnyWorkflowAction, allowing bypassing an + /// intermediate action. + public func makeOutputSink() -> Sink { + return makeSink(of: AnyWorkflowAction.self) + .contraMap { AnyWorkflowAction(sendingOutput: $0) } + } }