"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const property_decorator_1 = require("../property/property.decorator");
/**
 * Makes sure the property will be marshalled to a S(et) type. The modelClass is required if the collection items
 * have some property decorators, so we can retrieve this information using the model class.
 */
function TypedSet(modelClass) {
    return (target, propertyKey) => {
        if (typeof propertyKey === 'string') {
            const typeInfo = {
                type: Set,
                isCustom: true,
            };
            if (modelClass) {
                typeInfo.genericType = modelClass;
            }
            property_decorator_1.initOrUpdateProperty({ typeInfo }, target, propertyKey);
        }
    };
}
exports.TypedSet = TypedSet;
//# sourceMappingURL=typed-set.decorator.js.map