"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateOwnReflectMetadata = updateOwnReflectMetadata;
const getOwnReflectMetadata_1 = require("./getOwnReflectMetadata");
function updateOwnReflectMetadata(target, metadataKey, buildDefaultValue, callback, propertyKey) {
    const metadata = (0, getOwnReflectMetadata_1.getOwnReflectMetadata)(target, metadataKey, propertyKey) ??
        buildDefaultValue();
    const updatedMetadata = callback(metadata);
    Reflect.defineMetadata(metadataKey, updatedMetadata, target, propertyKey);
}
//# sourceMappingURL=updateOwnReflectMetadata.js.map