Skip to content

Commit e4beac6

Browse files
author
Jay Herron
committed
Modifies EventStream permissions for package overrides
1 parent 9da26da commit e4beac6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Sources/GraphQL/Subscription/EventStream.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
import 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
}

0 commit comments

Comments
 (0)