-
Notifications
You must be signed in to change notification settings - Fork 47
Adds a convenience for mapping Never outputs to other types #340
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
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.
thanks! left some minor comments. also a test that this new method 'does the right thing' should be added, probably to AnyWorkflowTests.swift
12b344b
to
3420d77
Compare
Great feedback, I also added a simple test for it |
This reminds me of ReactiveSwift's let (numbersSignal, numbersObserver) = Signal<Int, Never>.pipe()
let (lettersSignal, lettersObserver) = Signal<String, NSError>.pipe()
numbersSignal
.promoteError(NSError.self)
.combineLatest(with: lettersSignal) I wonder if there are situations where that parameter is necessary for type inference to be succeed or be performant? |
…ithout generating compiler warnings
3420d77
to
8ed9bb3
Compare
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.
lgtm – thanks!
Adds a way to map a workflow's
Never
output type to a different type without generating compiler warnings. Fixes #339