@qrvey/formula-lang
Version:
QFormula support for qrvey projects
20 lines • 759 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isBooleanExpression = void 0;
const constants_1 = require("../constants");
const dictionary_1 = require("../errors/dictionary");
function isBooleanExpression(_param, dataType) {
const valid = dataType === constants_1.AST_PRIMITIVES.BOOLEAN;
const baseResponse = {
valid,
mismatchData: {
primitive: constants_1.AST_PRIMITIVES.BOOLEAN,
},
};
if (!valid) {
return Object.assign(Object.assign({}, baseResponse), dictionary_1.ERROR_DICTIONARY[dictionary_1.ERROR_LIST.booleanExpression]);
}
return baseResponse;
}
exports.isBooleanExpression = isBooleanExpression;
//# sourceMappingURL=isBooleanExpression.js.map