InteropObservable and Observable incompatible #6662
Unanswered
shortercode
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've been having frequent issues with mismatched versions of RXjs between our application and the dependencies of the application. Functionally these cause no issues but typescript often end up exploding over type assignability (
Observable !== Observable
). I hoped to resolve this issue by usingfrom
as an adaptor for the importedObservable
s before piping off it.from
accepts bothObservable
andInteropObservable
so it should take RXjsObservable
s and alternative implementations so long as they meet the specification. It will not however accept older versions of the RXjs Observable because it doesn't match the type forInteropObservable
. Specifically the issue is down to howSymbol.observable
is polyfilled.InteropObservable
uses the spec complaintSymbol.observable
value which is of the typesymbol
. ButObservable
uses the internalSymbol_observable
which is the typesymbol | string
and hence does not match the function signature.Does anyone have a workaround which doesn't involve modifying the versions?
Beta Was this translation helpful? Give feedback.
All reactions