"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const assert = require("../../../base/common/assert.js");
const types = require("../../../base/common/types.js");
class RegistryImpl {
  constructor() {
    this.data = /* @__PURE__ */ new Map();
  }
  add(id, data) {
    assert.ok(types.isString(id));
    assert.ok(types.isObject(data));
    assert.ok(!this.data.has(id), "There is already an extension with this id");
    this.data.set(id, data);
  }
  as(id) {
    return this.data.get(id) || null;
  }
}
const Registry = new RegistryImpl();
exports.Registry = Registry;
