Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import Foundation
public protocol NetworkDataTransferService {
typealias CompletionHandler<T> = (Result<T, NetworkDataTransferError>) -> Void
typealias CompletionHandlerCollection<T> = (Result<ResponseData<T>, NetworkDataTransferError>) -> Void
@available(macOS 10.15, *)
typealias TaskType<T> = Task<T, Error>
@available(macOS 10.15, *)
typealias TaskTypeCollection<T> = Task<[T], Error>

func request<T: Decodable, E: RequestableEndpoint>(
Expand Down
1 change: 1 addition & 0 deletions Sources/Networking/NetworkService/NetworkService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation

public protocol NetworkService {
typealias CompletionHandler = (Result<Data?, NetworkError>) -> Void
@available(macOS 10.15, *)
typealias TaskType = Task<Data, Error>

func request(endpoint: any RequestableEndpoint, completion: @escaping CompletionHandler) -> CancellableHttpRequest?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation

public protocol NetworkSessionManager {
typealias CompletionHandler = (Data?, URLResponse?, Error?) -> Void
@available(macOS 10.15, *)
typealias TaskType = Task<(Data, URLResponse), Error>

func request(_ request: URLRequest, completion: @escaping CompletionHandler) -> CancellableHttpRequest
Expand Down