gauge-ts
Version:
Typescript runner for Gauge
33 lines (32 loc) • 804 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableRow = void 0;
class TableRow {
_cells;
constructor() {
this._cells = new Map();
}
addCell(header, value) {
this._cells.set(header, value);
}
getCell(columnName) {
return this._cells.has(columnName)
? this._cells.get(columnName)
: "";
}
getCellValues() {
return Array.from(this._cells.values());
}
get size() {
return this._cells.size;
}
/**
* @deprecated Use getCellValues() instead.
* @public
*/
get cells() {
console.warn(".cells accessor is deprecated. Use .getCellValues() instead.");
return Array.from(this._cells.values());
}
}
exports.TableRow = TableRow;