"use strict";
// For reference: https://github.com/Microsoft/vscode/blob/master/extensions/typescript-language-features/src/tsServer/callbackMap.ts
Object.defineProperty(exports, "__esModule", { value: true });
var CallbackMap = /** @class */ (function () {
    function CallbackMap() {
        this.callbacks = new Map();
    }
    CallbackMap.prototype.add = function (sequence, callback) {
        this.callbacks.set(sequence, callback);
    };
    CallbackMap.prototype.fetch = function (sequence) {
        var callback = this.callbacks.get(sequence);
        this.delete(sequence);
        return callback;
    };
    CallbackMap.prototype.delete = function (sequence) {
        this.callbacks.delete(sequence);
    };
    return CallbackMap;
}());
exports.CallbackMap = CallbackMap;
