We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Observer
Observers can now be represented using a generic typealias, since they carry no context other than the closure:
extension Signal { public typealias Observer<Value, Error> = (Event<Value, Error>) -> Void }
Without the shorthands, it doesn't seem to hurt the legibility at call site.
observer.send(value: 1) observer(.value(1)) observer.sendCompleted() observer(.completed) observer.sendInterrupted() observer(.interrupted) observer.send(error: Error()) observer(.failed(error))
The downside is impossible migration.
Related: Observer was introduced in ReactiveCocoa/ReactiveCocoa#2442 to replace the send* free functions and Event.Sink.
send*
Event.Sink
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Observers can now be represented using a generic typealias, since they carry no context other than the closure:
Without the shorthands, it doesn't seem to hurt the legibility at call site.
The downside is impossible migration.
Related:
Observer
was introduced in ReactiveCocoa/ReactiveCocoa#2442 to replace thesend*
free functions andEvent.Sink
.The text was updated successfully, but these errors were encountered: