Rx.Observable.prototype.finally(action)
Invokes a specified action after the source observable sequence terminates gracefully or exceptionally.
参数
predicate
(Function
): A function to test each source element for a condition; The callback is called with the following information:- the value of the element
- the index of the element
- the Observable object being subscribed
[thisArg]
(Any
): Object to use asthis
when executing the predicate.
返回值
(Observable
): An observable sequence that contains elements from the input sequence that satisfy the condition.