"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.arrayCopyData = void 0;
/**
 * @internal
 */
/**
 * Creates a list object that is a copy of the input IEnumerable object
 */
// tslint:disable-next-line: export-name
function arrayCopyData(resOpt, source, options) {
    if (!source || !source.length) {
        return undefined;
    }
    const casted = [];
    const l = source.length;
    for (let i = 0; i < l; i++) {
        const element = source.allItems ?
            source.allItems[i] : source[i];
        casted.push(element ? element.copyData(resOpt, options) : undefined);
    }
    return casted;
}
exports.arrayCopyData = arrayCopyData;
//# sourceMappingURL=CopyDataUtils.js.map