16 lines
736 B
Plaintext
16 lines
736 B
Plaintext
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getBindingId = getBindingId;
|
|
const reflect_metadata_utils_1 = require("@inversifyjs/reflect-metadata-utils");
|
|
const ID_METADATA = '@inversifyjs/container/bindingId';
|
|
function getBindingId() {
|
|
const bindingId = (0, reflect_metadata_utils_1.getOwnReflectMetadata)(Object, ID_METADATA) ?? 0;
|
|
if (bindingId === Number.MAX_SAFE_INTEGER) {
|
|
(0, reflect_metadata_utils_1.setReflectMetadata)(Object, ID_METADATA, Number.MIN_SAFE_INTEGER);
|
|
}
|
|
else {
|
|
(0, reflect_metadata_utils_1.updateOwnReflectMetadata)(Object, ID_METADATA, () => bindingId, (id) => id + 1);
|
|
}
|
|
return bindingId;
|
|
}
|
|
//# sourceMappingURL=getBindingId.js.map |