1 | import Base from './base';
|
2 | import Row from './row';
|
3 | import { OneDArray, TCell, TwoDArray } from './types';
|
4 | declare class Tabular extends Base {
|
5 | private _rows;
|
6 | private _length;
|
7 | constructor(rows?: Row[] | Row);
|
8 | get rows(): Row[];
|
9 | set rows(rows: Row[]);
|
10 | get length(): number;
|
11 | set length(len: number);
|
12 | toArray(): TCell[][];
|
13 | /**
|
14 | * Creates a new Tabular from an array of Row(s)
|
15 | * This method generates a new ID for the Tabular and all nested elements
|
16 | *
|
17 | * @param rows
|
18 | * @returns Tabular
|
19 | */
|
20 | static fromRows(rows: Row[]): Tabular;
|
21 | /**
|
22 | * Creates a new Tabular from a 2D array
|
23 | * This method generates a new ID for the Tabular and all nested elements
|
24 | *
|
25 | * @param data
|
26 | * @returns Tabular
|
27 | */
|
28 | static fromArray<T extends TCell>(data: OneDArray<T> | TwoDArray<T>): Tabular;
|
29 | }
|
30 | export default Tabular;
|