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