-
Notifications
You must be signed in to change notification settings - Fork 47
Expose Publisher.asAnyWorkflow as public API #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -21,17 +21,17 @@ import Foundation | |||
import Workflow | |||
|
|||
struct PublisherWorkflow<WorkflowPublisher: Publisher>: Workflow where WorkflowPublisher.Failure == Never { | |||
public typealias Output = WorkflowPublisher.Output | |||
public typealias State = Void | |||
public typealias Rendering = Void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing some cleanup while here - PublisherWorkflow
isn't public
so these don't need to be either
Do we want to encourage using publishers directly in a workflow like this instead of using a worker? |
I guess we already indirectly exposed this with running and map output so I'm fine with it. |
Is there a way to use |
|
Oh I see - you mean manually defining your own worker like this. The ReactiveSwift APIs allow you to use |
Without this API consuming a
Publisher
inside a workflow is only possible by either rendering it directly via.render(in:)
or by first callingmapOutput
: