debounceTime does not emit when queueScheduler is used
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31.7k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
If synchronous scheduler is used and there are no other tasks debounceTime does not emit value to subscriber.
Expected behavior
debounceTime should work properly with queueScheduler as it was in v6
expected output
emit!
actual output
No emit at all
Reproduction code
import { BehaviorSubject, queueScheduler } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
const data$ = new BehaviorSubject('emit!');
data$.pipe(debounceTime(0, queueScheduler)).subscribe(console.log);
Reproduction URL
https://stackblitz.com/edit/q7u9jg-hykb4x
Version
7.5.1
Environment
No response
Additional context
No response
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 debounceTime operator and its queueScheduler path, then run the reproduction code from the issue with RxJS 7.5.1. Confirm that debounceTime(0, queueScheduler) emits emit! from the BehaviorSubject, matching the expected behavior and not the current lack of output.
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
- 45/100