1 /** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
2 import * as tslib_1 from "tslib";
3 import { Subscriber } from '../Subscriber';
4 import { Subscription } from '../Subscription';
5 export function finalize(callback) {
6 return function (source) { return source.lift(new FinallyOperator(callback)); };
8 var FinallyOperator = /*@__PURE__*/ (function () {
9 function FinallyOperator(callback) {
10 this.callback = callback;
12 FinallyOperator.prototype.call = function (subscriber, source) {
13 return source.subscribe(new FinallySubscriber(subscriber, this.callback));
15 return FinallyOperator;
17 var FinallySubscriber = /*@__PURE__*/ (function (_super) {
18 tslib_1.__extends(FinallySubscriber, _super);
19 function FinallySubscriber(destination, callback) {
20 var _this = _super.call(this, destination) || this;
21 _this.add(new Subscription(callback));
24 return FinallySubscriber;
26 //# sourceMappingURL=finalize.js.map