I'm migrating to Swift 4 and I have the following typealias:
typealias AFDataSuccess = (task: URLSessionDataTask, responseObject: Any?)
but I'm having trouble converting it as shown in the attached image:
You have to use like this :
manager.post(route.url, parameters: params, progress: nil, success: { (task: URLSessionDataTask, response: Any?) in
print(response)
}) { (task: URLSessionDataTask, error: Error) in
print(error.localizedDescription)
}