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