File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Sources/GraphQL/Subscription Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 33import RxSwift
44
55/// Abstract event stream class - Should be overridden for actual implementations
6- public class EventStream < Element> {
6+ open class EventStream < Element> {
7+ public init ( ) { }
78 /// Template method for mapping an event stream to a new generic type - MUST be overridden by implementing types.
8- func map< To> ( _ closure: @escaping ( Element ) throws -> To ) -> EventStream < To > {
9+ open func map< To> ( _ closure: @escaping ( Element ) throws -> To ) -> EventStream < To > {
910 fatalError ( " This function should be overridden by implementing classes " )
1011 }
1112}
@@ -19,7 +20,7 @@ public class ObservableEventStream<Element> : EventStream<Element> {
1920 init ( _ observable: Observable < Element > ) {
2021 self . observable = observable
2122 }
22- override func map< To> ( _ closure: @escaping ( Element ) throws -> To ) -> EventStream < To > {
23+ override open func map< To> ( _ closure: @escaping ( Element ) throws -> To ) -> EventStream < To > {
2324 return ObservableEventStream < To > ( observable. map ( closure) )
2425 }
2526}
You can’t perform that action at this time.
0 commit comments