Closed Tyler-Keith-Thompson closed 3 years ago
I like the idea, but we may not get to it right away as we're focused on the SwiftUI milestone.
@wiemerm @Tyler-Keith-Thompson is this in main already? I thought I saw a pass through type.
It is not. At least not as intended with the feature request. The point is to remove the boilerplate of having to set input and output to AnyWorkflow.PassedArgs and then storing data and passing it forward on a proceed.
I don’t think it’ll be a difficult addition, though
Is your feature request related to a problem? Please describe.
Not so much a problem, just an idea
Describe the solution you'd like
Idea: We could have a Passthrough type that's a little different than Never. Whereas Never means "I don't take in a value" or "I don't pass out a value". Passthrough could mean "I'll forward on anything that gets passed to me automatically`.
Hypothetical: Imagine a workflow wherein you've got a terms and conditions FlowRepresentable. Now it knows whether terms have been accepted or not, and it will make the decision to abandon whatever workflow it is in if the terms are not accepted. However if terms are accepted it might send that information to a server then move forward.
If that termsAndConditions had a Passthrough type for its input and output it would be even easier to stick those terms and conditions in any workflow while maintaining type safety of that flow.
Describe alternatives you've considered
I mean users can do this now, manually. So they could continue to do it manually. Something like:
That's just a lot of boilerplate