export default class DataTable { constructor ( private readonly rows ) { } get raw ( ) { return this . rows ; } public transpose ( ) { const transposed = this . rows [ 0 ] . map ( ( x , i ) => this . rows . map ( ( y ) => y [ i ] ) ) ; return new DataTable ( transposed ) ; } public diff ( other ) { if ( other === undefined ) { throw new Error ( 'No other table' ) ; } } }