Custom RxJS operator that accumulates notifications with their
elapsed time relative to a provided start time.
Each emitted notification string is converted into a NotificationEntry
object, and the operator maintains an array of all previous entries.
Returns
An OperatorFunction that transforms an Observable of strings into
an Observable of NotificationEntry[].
Example
conststartTime = performance.now(); notifications$.pipe(withTimeDifference(startTime)).subscribe(entries=> { console.log(entries); // Array of NotificationEntry objects with elapsed time });
Parameters
startTime: number
The timestamp (in milliseconds) to use as the reference
point for calculating elapsed time. Typically obtained via performance.now().
Custom RxJS operator that accumulates notifications with their elapsed time relative to a provided start time.
Each emitted notification string is converted into a
NotificationEntryobject, and the operator maintains an array of all previous entries.Returns
An OperatorFunction that transforms an Observable of strings into an Observable of
NotificationEntry[].Example