mobxjs / mobxjs/mobx-utils

toStream is not rxjs compatible

Open
#300 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.2k
Forks
130
PR merge metrics
No merged PRs in 30d

Description

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:

mobx-utils: 6.0.4
rxjs: 7.3.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/observable-stream.ts at line 22 and inspect the commented Symbol.observable member on IObservableStream. Reproduce the TypeScript error using the reported mobx-utils 6.0.4 and rxjs 7.3.0 versions, then verify that RxJS's from function accepts the stream without the reported type incompatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.