"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getOptionalKeys = exports.optional = void 0;
const PROPERTY_METADATA_KEY = Symbol("keyOptional");
function optional() {
    return (target, propertyKey) => {
        const allMetadata = Reflect.get(target, PROPERTY_METADATA_KEY) || {};
        allMetadata[propertyKey] = allMetadata[propertyKey] || {};
        Reflect.set(target, PROPERTY_METADATA_KEY, allMetadata);
    };
}
exports.optional = optional;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getOptionalKeys(object) {
    try {
        return Reflect.get(object, PROPERTY_METADATA_KEY);
    }
    catch (_a) {
        return undefined;
    }
    return undefined;
}
exports.getOptionalKeys = getOptionalKeys;
//# sourceMappingURL=typeReflection.js.map