UNPKG

idea-toolbox

Version:
22 lines (21 loc) 716 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExcelRow = void 0; const resource_model_1 = require("./resource.model"); /** * A class to inherit for specifying the format of an Excel file's rows. */ class ExcelRow extends resource_model_1.Resource { load(x) { super.load(x); this.__rowNum__ = this.clean(x.__rowNum__, Number); } /** * Sample data to show how the content of the Excel file should be structured. * To be updated accordingly in the child class. */ static getTemplateExample() { return [{ __rowNum__: 1 }, { __rowNum__: 2 }, { __rowNum__: 3 }].map(x => new ExcelRow(x)); } } exports.ExcelRow = ExcelRow;