Last active
April 5, 2020 01:43
-
-
Save jasdev/34948b0a2a1ede6356e3e96c9ff59a86 to your computer and use it in GitHub Desktop.
`Just`’s `ignoreOutPut` overload.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just("someString") | |
.ignoreOutput() /// (1) Combine specializes | |
/// [`Just`’s overload of `ignoreOutput`](https://developer.apple.com/documentation/combine/just/3343929-ignoreoutput) | |
/// to return an `Empty<String, Never>` (note, the output type didn’t get `Never`’d out) instead of wrapping | |
/// it a [`Publishers.IgnoreOutput`](https://developer.apple.com/documentation/combine/publishers/ignoreoutput) level. | |
.append("anotherStringPostFinished") /// (2) Since upstream is an `Empty<String, Never>` and the | |
/// `Output` generic _didn’t_ get `Never`’d out, the `append` here can carry on accepting `String`s. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment