diff --git a/src/ux.ts b/src/ux.ts index 197b8f3..5191e0e 100644 --- a/src/ux.ts +++ b/src/ux.ts @@ -294,7 +294,7 @@ export class UX { if (this.isOutputEnabled) { // This is either an array of column names or an already built Partial if (isArray(columns)) { - const tableColumns: Partial>> = {}; + const tableColumns: CliUx.Table.table.Columns> = {}; for (const col of columns) { tableColumns[col] = { header: col @@ -303,7 +303,7 @@ export class UX { .join(' '), }; } - this.cli.ux.table(rows, { columns: tableColumns }, options); + this.cli.ux.table(rows, tableColumns, options); } else { this.cli.ux.table(rows, columns, options); } diff --git a/test/unit/ux.test.ts b/test/unit/ux.test.ts index fcc73ee..4db1edc 100644 --- a/test/unit/ux.test.ts +++ b/test/unit/ux.test.ts @@ -318,7 +318,7 @@ describe('UX', () => { expect(info.called).to.equal(true); expect(info.firstCall.args[0]).to.equal(tableData); expect(retVal.x).to.deep.equal(tableData); - expect(retVal.y.columns).to.deep.equal(expectedOptions); + expect(retVal.y).to.deep.equal(expectedOptions); expect(ux1).to.equal(ux); });