@@ -4,28 +4,32 @@ import Combine
44
55@available ( iOS 13 . 0 , tvOS 13 . 0 , watchOS 6 . 0 , macOS 10 . 15 , * )
66public extension URLServer {
7- func publisher( endpoint: Endpoint ) -> Publishers . Endpoint < Void , ErrorType > {
7+ func publisher( endpoint: Endpoint ) -> AnyPublisher < Void , ErrorType > {
88 Publishers . Endpoint { completion in
99 self . call ( endpoint: endpoint, completion: completion)
1010 }
11+ . eraseToAnyPublisher ( )
1112 }
1213
13- func publisher( data endpoint: Endpoint ) -> Publishers . Endpoint < Data , ErrorType > {
14+ func publisher( data endpoint: Endpoint ) -> AnyPublisher < Data , ErrorType > {
1415 Publishers . Endpoint { completion in
1516 self . call ( data: endpoint, completion: completion)
1617 }
18+ . eraseToAnyPublisher ( )
1719 }
1820
19- func publisher< EP: ResponseEndpoint > ( response endpoint: EP ) -> Publishers . Endpoint < EP . Response , ErrorType > {
21+ func publisher< EP: ResponseEndpoint > ( response endpoint: EP ) -> AnyPublisher < EP . Response , ErrorType > {
2022 Publishers . Endpoint { completion in
2123 self . call ( response: endpoint, completion: completion)
2224 }
25+ . eraseToAnyPublisher ( )
2326 }
2427
25- func publisher( download endpoint: Endpoint ) -> Publishers . Endpoint < URL , ErrorType > {
28+ func publisher( download endpoint: Endpoint ) -> AnyPublisher < URL , ErrorType > {
2629 Publishers . Endpoint { completion in
2730 self . download ( endpoint: endpoint, completion: completion)
2831 }
32+ . eraseToAnyPublisher ( )
2933 }
3034}
3135
0 commit comments