Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Workflow/Sources/RenderContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<WorkflowType.Output> {
return makeSink(of: AnyWorkflowAction.self)
.contraMap { AnyWorkflowAction<WorkflowType>(sendingOutput: $0) }
}
}