Last active
March 25, 2020 21:22
-
-
Save jasdev/0cf0663c4f54446b046f946b1f7af5a9 to your computer and use it in GitHub Desktop.
Postfix type erasure in Combine.
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
import Combine | |
postfix operator ^ | |
postfix func ^ <Publisher: Combine.Publisher>(_ publisher: Publisher) | |
-> AnyPublisher<Publisher.Output, Publisher.Failure> { | |
publisher.eraseToAnyPublisher() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment