Closed Evangelink closed 8 years ago
Could you give an example? When an F# function with a known argument type is called flexibility is added to allow an upcast from an argument to the argument type, so in most cases using #
is not needed. If there is a collection of IObservables, or if using with a combinatory, then it may be needed.
I am currently using an IObservable
type IPopulatableObservable<'T> =
inherit IObservable<'T>
abstract IsPopulated : IObservable<bool>
and I was using it (as you said) within a collection, getting from:
IObservable<seq<IPopulatableObservable<Model seq>>>
then doing a mergeSeq
IObservable<IPopulatableObservable<Model seq>>
then a switch where I had to do the cast using a map
IObservable<Model seq>
At first, I though the modification would be quite easy but then I end up realising I need to create another IObserver, BehaviorSubject and some other methods like Observable.Create...
Anyway too much things I am not sure how to do so I gave up for now...Meaning I don't really need it anymore. But if you want me to try to recreate a code example I can do it so you could see if it can be useful for someone else.
Hi,
I am currently using a sub interface from the IObservable and I need to upcast it everytime I use one of your wrapped method. I was wondering if you would see any reason why not replacing all (x : IObservable<_>) with (x : #IObservable<_>) so it can accept sub interfaces?
If you think it is all good for you I will make a PR.
Cheers, Amaury