"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Holder_1 = require("../../../../../../Class/Holder");
const ArrayBuffer_1 = require("../../../../../../wrap/ArrayBuffer");
const _ids_1 = require("../../../../../_ids");
class Buffer_ extends Holder_1.Holder {
    constructor(system) {
        super({
            fi: ['from', 'any'],
            fo: ['array'],
            i: [],
            o: [],
        }, {
            output: {
                array: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_BUFFER);
    }
    f({ from }, done) {
        const array_ = from.buffer();
        const array = (0, ArrayBuffer_1.wrapArrayBuffer)(array_, this.__system);
        done({
            array,
        });
    }
}
exports.default = Buffer_;
//# sourceMappingURL=index.js.map