Hi I'm trying to create a promise and then save the function fulfill and reject into in array or dictionary . I don't know if this is possible to do I get some compiler erros. I know you can store functions inside array but I think since is inside the promise I need to do something else, here is my code
let requestPromise = Promise<Bool> { fulfill, reject in
self.socket.emit(message,dic)
let dicFunc = [ "fulfill": fulfill, "reject":reject]
self.request.updateValue(dicFunc, forKey: uuid)
}
I get error Cannot invoke 'updateValue' with an argument list of type '([String : (NSError) -> Void], forKey: String)'