github-pages-deploy-action/node_modules/rxjs/_esm5/internal/operators/finalize.js
2020-03-06 22:45:40 -05:00

27 lines
1.0 KiB
JavaScript

/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
export function finalize(callback) {
return function (source) { return source.lift(new FinallyOperator(callback)); };
}
var FinallyOperator = /*@__PURE__*/ (function () {
function FinallyOperator(callback) {
this.callback = callback;
}
FinallyOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new FinallySubscriber(subscriber, this.callback));
};
return FinallyOperator;
}());
var FinallySubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(FinallySubscriber, _super);
function FinallySubscriber(destination, callback) {
var _this = _super.call(this, destination) || this;
_this.add(new Subscription(callback));
return _this;
}
return FinallySubscriber;
}(Subscriber));
//# sourceMappingURL=finalize.js.map