Skip to content
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

Combine Interoperability: first iteration #776

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Add eraseToAnyPublisher().
  • Loading branch information
andersio committed Apr 27, 2020
commit d47129e0374f6131b75950f44b05e2251f877c82
5 changes: 5 additions & 0 deletions Sources/CombineInteroperability/ToCombine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
import Combine

extension SignalProducerConvertible {
@available(macOS 10.15, iOS 13.0, tvOS 13.0, macCatalyst 13.0, watchOS 6.0, *)
public func eraseToAnyPublisher() -> AnyPublisher<Value, Error> {
publisher().eraseToAnyPublisher()
}

@available(macOS 10.15, iOS 13.0, tvOS 13.0, macCatalyst 13.0, watchOS 6.0, *)
public func publisher() -> ProducerPublisher<Value, Error> {
ProducerPublisher(base: producer)
Expand Down