"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.finalize = void 0;
const Observable_js_1 = require("../Observable.js");
function finalize(callback) {
    return (source) => new Observable_js_1.Observable((subscriber) => {
        source.subscribe(subscriber);
        subscriber.add(callback);
    });
}
exports.finalize = finalize;