"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateMaybeClassMetadataPostConstructor = updateMaybeClassMetadataPostConstructor;
const InversifyCoreError_1 = require("../../error/models/InversifyCoreError");
const InversifyCoreErrorKind_1 = require("../../error/models/InversifyCoreErrorKind");
function updateMaybeClassMetadataPostConstructor(methodName) {
    return (metadata) => {
        if (metadata.lifecycle.postConstructMethodNames.has(methodName)) {
            throw new InversifyCoreError_1.InversifyCoreError(InversifyCoreErrorKind_1.InversifyCoreErrorKind.injectionDecoratorConflict, `Unexpected duplicated postConstruct method ${methodName.toString()}`);
        }
        metadata.lifecycle.postConstructMethodNames.add(methodName);
        return metadata;
    };
}
//# sourceMappingURL=updateMaybeClassMetadataPostConstructor.js.map