hyperformula
Version:
HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas
36 lines (34 loc) • 781 B
JavaScript
;
exports.__esModule = true;
exports.ParsingErrorVertex = void 0;
var _Cell = require("../Cell");
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
/**
* Represents a cell that contains a parsing error.
*/
class ParsingErrorVertex {
/**
* Constructor
*/
constructor(errors, rawInput) {
this.errors = errors;
this.rawInput = rawInput;
}
/**
* Returns the value of the cell.
*/
getCellValue() {
const firstNonemptyMessage = this.errors.map(error => error.message).find(msg => msg);
return _Cell.CellError.parsingError(firstNonemptyMessage);
}
/**
* Returns the formula of the cell.
*/
getFormula() {
return this.rawInput;
}
}
exports.ParsingErrorVertex = ParsingErrorVertex;