A lot of this is my fault, but given that we've decided to interop with promises in most places, we should probably ensure we do it consistently. That means updating the family of static defer creation operators (defer, if, using, etc.) to accept promises, lowercase-o observables, etc. to use our internal subscribeToResult function.
Is this related to https://github.com/ReactiveX/RxJS/issues/1246?
@kwonoj yes it is
Really, there shouldn't be anything public facing that "accepts" Observable<T>, it should always accept SubscribableOrPromise<T>. Or at the very least Subscribable<T>. Having a function that accepts a strict class type is a 101 mistake, we should have been using interfaces this whole time.
We should probably make separate issues for the operators in question.
Can I remind people that if future PRs change the signature of an operator, please remember to update also the docs that I wrote for them. Otherwise docs will be a moving target
I think this one's covered mostly, can this be closed maybe? (Assume ConnectableObservable is not fall into this?)
I think most static operators are now covered as commented, /cc @blesh for visibility before closing this out and switching to open issues for each individuals, in case I miss something should be covered before closing.
Closing this, if there's remaining operator will file separate.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Really, there shouldn't be anything public facing that "accepts"
Observable<T>, it should always acceptSubscribableOrPromise<T>. Or at the very leastSubscribable<T>. Having a function that accepts a strict class type is a 101 mistake, we should have been using interfaces this whole time.