答案 0 :(得分:0)
Swift 4.0
Closure is we can say that function as argument, So function have parameter and return type also.
As per your code you missed to specify the return type of function, If closure return nothing than you must have to defined Void return type.
func getTypingUser(_ completionHandler: ([String: String]) -> ()) {
guard let typingUser = dataArray[0] as? [String : String] else { return }
completionHandler(typingUser)
}