@real-estate/core
Version:
A simple library to maintain state in JavaScript
19 lines (18 loc) • 560 B
JavaScript
;
/* tslint:disable */
Object.defineProperty(exports, "__esModule", { value: true });
var StateIdCounter = /** @class */ (function () {
function StateIdCounter() {
this.counter = 1;
}
StateIdCounter.getInstance = function () {
return this.instance || (this.instance = new this());
};
StateIdCounter.prototype.getNewStateid = function () {
var id = this.counter;
this.counter = id + 1;
return id;
};
return StateIdCounter;
}());
exports.default = StateIdCounter;