publishLast
Returns a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification.
Parameters
There are no parameters.
Returns
UnaryFunction<Observable<T>, ConnectableObservable<T>>
: An observable sequence that contains the elements of a
sequence produced by multicasting the source sequence.
Description
Similar to publish
, but it waits until the source observable completes and stores
the last emitted value.
Similarly to publishReplay
and publishBehavior
, this keeps storing the last
value even if it has no more subscribers. If subsequent subscriptions happen, they will
immediately get that last stored value and complete.