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
is the one to blame
Describe the bug
TimeoutInfois an object that is passed to thewithcallback ofTimeoutConfig(timeoutoperator's config object). It haslastValuefield which seems to benullregardless of what was the last value emitted before the timeout occurred.Expected behavior
lastValueis expected to contain a value emitted right before the timeout firing.Reproduction code
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