Last active
September 30, 2018 20:52
-
-
Save iby/a180f44706d0d71cf0cfd5c45bd119a9 to your computer and use it in GitHub Desktop.
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
extension Reactive { | |
/// A proxy which holds reactive binding target extensions of `Base`. | |
struct Binds<Base> { | |
fileprivate init(_ base: Base) { self.base = base } | |
let base: Base | |
} | |
var bind: Binds<Base> { return Binds(self.base) } | |
/// A proxy which holds reactive signal extensions of `Base`. | |
struct Signals<Base> { | |
fileprivate init(_ base: Base) { self.base = base } | |
let base: Base | |
} | |
var signal: Signals<Base> { return Signals(self.base) } | |
/// A proxy which holds reactive signal producer extensions of `Base`. | |
struct Producers<Base> { | |
fileprivate init(_ base: Base) { self.base = base } | |
let base: Base | |
} | |
var producer: Producers<Base> { return Producers(self.base) } | |
} | |
extension Reactive.Binds where Base: ReactiveExtensionsProvider { | |
/// Convenience `self.base.reactive` accessor. | |
var reactive: Reactive<Base> { return self.base.reactive } | |
} | |
extension Reactive.Signals where Base: ReactiveExtensionsProvider { | |
/// Convenience `self.base.reactive` accessor. | |
var reactive: Reactive<Base> { return self.base.reactive } | |
} | |
extension Reactive.Producers where Base: ReactiveExtensionsProvider { | |
/// Convenience `self.base.reactive` accessor. | |
var reactive: Reactive<Base> { return self.base.reactive } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment