-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
AGENDA ITEMFlagged for discussion at core team meetingsFlagged for discussion at core team meetings
Description
Describe the bug
TimeoutInfo
is an object that is passed to the with
callback of TimeoutConfig
(timeout
operator's config object). It has lastValue
field which seems to be null
regardless of what was the last value emitted before the timeout occurred.
Expected behavior
lastValue
is expected to contain a value emitted right before the timeout firing.
Reproduction code
import { interval, concat, take, EMPTY, timeout } from 'rxjs';
const fast = interval(10).pipe(take(5));
const slow = interval(1000).pipe(take(5));
const replacement = info => {console.log(info); return EMPTY }
const withTimeout = concat(fast, slow).pipe(timeout({each: 500, with: replacement}))
withTimeout.subscribe(console.log);
Reproduction URL
No response
Version
7.8.1
Environment
Browser (V8)
Additional context
Looks like this line
rxjs/src/internal/operators/timeout.ts
Line 362 in 3859f86
lastValue = null; |
srn271 and jinzhou
Metadata
Metadata
Assignees
Labels
AGENDA ITEMFlagged for discussion at core team meetingsFlagged for discussion at core team meetings