finalize

Returns an Observable that mirrors the source Observable, but will call a specified function when the source terminates on complete or error.

finalize<T>(callback: () => void): MonoTypeOperatorFunction<T>

Parameters

callback

Function to be called when source terminates.

Returns

MonoTypeOperatorFunction<T>: An Observable that mirrors the source, but will call the specified function on termination.