I have defined a function with the following signature:
public func loginUser(username: String) -> ReactiveCocoa.Signal<String, NSError>
I am trying to call the method toRACSignal and pass it the result of loginUser.
The signatures for toRACSignal are:
func toRACSignal<T, E>(signal: ReactiveCocoa.Signal<T, E>) -> RACSignal
func toRACSignal<T, E>(signal: ReactiveCocoa.Signal<T?, E>) -> RACSignal
My attempt looks like this:
public func RACLoginUser(username: String) -> RACSignal {
let signal = loginUser(username)
return toRACSignal(signal)
}
but this results in an error saying:
Error:(33, 12) cannot find an overload for 'toRACSignal' that accepts an argument list of type '(Signal)'
What am I doing wrong?