The `isScheduler()` util bug is causing observables created by `of()` to be hanged
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31.7k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
Bug Report
Current Behavior
The observable created by of() operator is hanged if the param object has the property name schedule with a function value.
Expected behavior
The observable created by of() operator should never hanged if the param object has the property name schedule with a function value.
This bug is quite annoying because objects with the schedule field of function type is not rare.
Reproduction
- REPL or Repo link:
https://stackblitz.com/edit/rxjs-jw2uu9?file=index.ts
import { of } from 'rxjs';
const value = {
schedule: function() {}
//... my other data fields here
};
of(value).subscribe(console.log); // the value is never printed
Environment
- Runtime: node v14.16.1
- RxJS version: 7.3.0
Possible Solution
maybe to have extra/special identity field for the internal Scheduler objects in order to detect them precisely.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the isScheduler() utility and the of() entry point, then reproduce the behavior using the linked StackBlitz example. Done means an observable created with of() emits an object whose schedule property is a function instead of hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100