Skip to main content



function createReplayLastSource<GValue, GSource extends ISource<GValue>>(
source: GSource,
...initialValue: ICreateReplayLastSourceInitialValue<GValue>
): IReplayLastSource<GValue, GSource>
type ICreateReplayLastSourceInitialValue<GValue> = [] | [GValue];


Creates a IReplayLastSource.

When calling createReplayLastSource you must provide a source which is used to build the ReplayLastSource. You may choose for example, between an IUnicastSource or a IMulticastSource.

You may provide an initial value (initialValue). If you don't, the ReplayLastSource waits for the first value received.