How to work with Generics? I want to define two Ty...
# koin
v
How to work with Generics? I want to define two Types of Observables:
Copy code
applicationContext {
bean(optionalOAuthHeader) { getAuthorizationHeader() } // is of Type Observable<Optional<Pair<String, String>>>
bean() { get<Observable<Optional<Pair<String, String>>>(optionalOAuthHeader) // is of Type Observable<Pair<String, String>>
.filter {it is Optional.None}
.map {
if (it is Optional.Value)
it.value
else
throw RuntimeException()
}
}

}
When I resolve this, its complaining with: Multiple definitions found to resolve type 'io.reactivex.Observable'