I am migrating from promiseKit 4.3 -> 6 and got stuck on this one error. Any help would be appreciated. Thanks
error - "Cannot convert value of type '() -> Environment' to expected argument type '() -> _'"
open func run() -> Promise<Environment> {
return GetSettingsQuery().run().then { result -> Environment in
var environment = Environment.certification
if let dict = result.data as? Dictionary<String, AnyObject>,
let environementRaw = dict[“ABC”] as? Int,
let env = Environment(rawValue: environementRaw) {
environment = env
}
return environment
}
}