bigint-crypto-utils/node_modules/rxjs/_esm5/internal/operators/finalize.js

27 lines
1.0 KiB
JavaScript
Raw Normal View History

/** 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