-
-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toStream is not rxjs compatible #300
Comments
I met the same problem when using rxjs7 with mobx-utils |
Feel free to uncomment, test and submitting a PR! I haven't used rxjs in a very long time, but sounds like a good change. |
I made custom to rxjs observer converter:
Not sure about gotchas, but for me, it works well |
@benlesh does the fix look good? |
Maybe It's really early here so maybe I'm just tired, but looking at the code in question I'm not entirely sure what was wrong with it. It's only supposed to handle observer, but it handles observer and function. It doesn't seem to be broken? |
While
I've created a Stackblitz to reproduce the issue: https://stackblitz.com/edit/typescript-5le5kn?file=index.ts (make sure to open the console). Should I file a separate issue on this? I'm not sure if this should be fixed on the RxJS side or |
I noticed that the Symbol.observable, that should contain itself, is commented in the IObservableStream, which breaks compatibility with latest rxjs
from
function.https://github.com/mobxjs/mobx-utils/blob/master/src/observable-stream.ts#L22
Resulting in
Argument of type 'IObservableStream<...>' is not assignable to parameter of type 'ObservableInput<...>'
If I understand this correctly, the Symbol.observable in the observable streams is accepted by the community as a standard of a sort. Is there a reason the line is commented?
Versions:
The text was updated successfully, but these errors were encountered: