UNPKG

@clawject/di

Version:

<p align="center"> <a href="https://clawject.com/" target="_blank"><img src="https://clawject.com/img/logo.svg" align="center" alt="Clawject Logo" width="120" height="120" /></a> </p>

13 lines (12 loc) 443 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BeanIdProvider = void 0; const Value_1 = require("../types/Value"); const Utils_1 = require("../Utils"); class BeanIdProvider { static getAndInc() { return this.lastId.value++; } } exports.BeanIdProvider = BeanIdProvider; BeanIdProvider.lastId = Utils_1.Utils.createVersionedStorageOrGetIfExisted('bean_id_storage', 0, new Value_1.Value(0));