"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var base_1 = require("./base");
var singleton = Symbol();
var singletonEnforcer = Symbol();
var BaseService = /** @class */ (function (_super) {
    __extends(BaseService, _super);
    function BaseService(enforcer) {
        var _this = _super.call(this) || this;
        if (enforcer !== singletonEnforcer) {
            throw new Error('Cannot construct singleton');
        }
        _this._type = 'BaseService';
        return _this;
    }
    Object.defineProperty(BaseService, "instance", {
        get: function () {
            if (!this[singleton]) {
                this[singleton] = new BaseService(singletonEnforcer);
            }
            return this[singleton];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseService.prototype, "type", {
        get: function () {
            return this._type;
        },
        set: function (value) {
            this._type = value;
        },
        enumerable: true,
        configurable: true
    });
    return BaseService;
}(base_1.Base));
exports.BaseService = BaseService;
//# sourceMappingURL=base-service.js.map