Syntax fixes

This commit is contained in:
Quico Moya 2018-11-15 23:44:48 +01:00 committed by Krunoslav Zaher
parent cba79fa0cc
commit e74a67951f

View File

@ -8,7 +8,7 @@
import RxSwift
/// Protocol that enables extension of `ControlEvent`.
/// A protocol that extends `ControlEvent`.
public protocol ControlEventType : ObservableType {
/// - returns: `ControlEvent` interface
@ -16,25 +16,25 @@ public protocol ControlEventType : ObservableType {
}
/**
Trait for `Observable`/`ObservableType` that represents event on UI element.
A trait for `Observable`/`ObservableType` that represents an event on a UI element.
It's properties are:
Properties:
- it never fails
- it won't send any initial value on subscription
- it will `Complete` sequence on control being deallocated
- it never errors out
- it delivers events on `MainScheduler.instance`
- it never fails,
- it doesnt send any initial value on subscription,
- it `Complete`s the sequence when the control deallocates,
- it never errors out, and
- it delivers events on `MainScheduler.instance`.
**The implementation of `ControlEvent` will ensure that sequence of events is being subscribed on main scheduler
(`subscribeOn(ConcurrentMainScheduler.instance)` behavior).**
**It is implementor's responsibility to make sure that that all other properties enumerated above are satisfied.**
**It is the implementors responsibility to make sure that all other properties enumerated above are satisfied.**
**If they aren't, then using this trait communicates wrong properties and could potentially break someone's code.**
**If they arent, using this trait will communicate wrong properties, and could potentially break someones code.**
**In case `events` observable sequence that is being passed into initializer doesn't satisfy all enumerated
properties, please don't use this trait.**
**If the `events` observable sequence passed into thr initializer doesnt satisfy all enumerated
properties, dont use this trait.**
*/
public struct ControlEvent<PropertyType> : ControlEventType {
public typealias E = PropertyType