buffer operator emits value on closingNotifier complete
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
The buffer operator emits the empty value on closingNotifier completes.
Expected behavior
No value emitted on closingNotifier completes.
Reproduction code
import { fromEvent, interval, buffer, takeUntil, debounceTime } from 'rxjs';
const addItem = fromEvent(document, 'click').pipe(takeUntil(interval(5000)));
const debounce = addItem.pipe(debounceTime(500));
addItem.pipe(buffer(debounce)).subscribe((d) => console.log(d));
Reproduction URL
https://stackblitz.com/edit/rwbsk1a8?devtoolsheight=50&file=index.ts
Version
7.8.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 RxJS buffer operator and run the reproduction from the issue or its StackBlitz URL. Confirm the behavior when the closingNotifier completes, then verify that completion produces no empty emission and add coverage for the reported case.
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
- 52/100