import { initOrUpdateProperty } from '../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.
 */
export function TypedSet(modelClass) {
    return function (target, propertyKey) {
        if (typeof propertyKey === 'string') {
            var typeInfo = {
                type: Set,
                isCustom: true,
            };
            if (modelClass) {
                typeInfo.genericType = modelClass;
            }
            initOrUpdateProperty({ typeInfo: typeInfo }, target, propertyKey);
        }
    };
}
//# sourceMappingURL=typed-set.decorator.js.map