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