Skip to content

Instantly share code, notes, and snippets.

@jasdev
Last active April 20, 2020 15:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jasdev/c580ba0db77935bdc8ad27a0954f1629 to your computer and use it in GitHub Desktop.
`ReplaySubject` `Publisher` conformance error.
final class ReplaySubject<Output, Failure: Error>: Subject { /// (1) /// ❌ Type ‘`ReplaySubject<Output, Failure>`’
/// does not conform to protocol ‘`Publisher`’.
typealias Output = Output
typealias Failure = Failure
private let bufferSize: Int
init(bufferSize: Int) {
self.bufferSize = bufferSize
}
func send(subscription: Subscription) { /* … */ }
func send(completion: Subscribers.Completion<Failure>) { /* … */ }
func send(_ value: Output) { /* … */ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment