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
Uh oh!
There was an error while loading. Please reload this page.
-
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 usingfromas an adaptor for the importedObservables before piping off it.fromaccepts bothObservableandInteropObservableso it should take RXjsObservables 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.observableis polyfilled.InteropObservableuses the spec complaintSymbol.observablevalue which is of the typesymbol. ButObservableuses the internalSymbol_observablewhich is the typesymbol | stringand 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