"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../Class/Functional");
const _ids_1 = require("../../../../_ids");
class Length1 extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['a', 'any'],
            o: ['length'],
        }, {
            input: {
                a: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_LENGTH_1);
    }
    async f({ a }, done, fail) {
        let length;
        try {
            length = await a.length();
        }
        catch (err) {
            fail(err.message.toLowerCase());
            return;
        }
        done({ length });
    }
}
exports.default = Length1;
//# sourceMappingURL=index.js.map