"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MIMO_1 = require("../../../../MIMO");
const _ids_1 = require("../../../_ids");
class StringToFloat extends MIMO_1.MIMO {
    constructor(system) {
        super({
            i: ['str'],
            o: ['n'],
        }, {}, system, _ids_1.ID_STRING_TO_FLOAT);
    }
    m({ str }) {
        const n = Number.parseFloat(str);
        if (isNaN(n)) {
            throw 'invalid number string';
        }
        else {
            return {
                n,
            };
        }
    }
}
exports.default = StringToFloat;
//# sourceMappingURL=index.js.map