Skip to content

Commit

Permalink
fix(types): add missing removeColumn and removeRow types
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Jul 28, 2020
1 parent b372b80 commit 8010f31
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions matrix.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -903,19 +903,31 @@ export class Matrix extends AbstractMatrix {
constructor(data: number[][]);
constructor(otherMatrix: AbstractMatrix);

/**
* Removes a column from the matrix (in place).
* @param index - Column index.
*/
removeColumn(index: number): this;

/**
* Removes a row from the matrix (in place).
* @param index - Row index.
*/
removeRow(index: number): this;

/**
* Adds a new column to the matrix (in place).
* @param index - Column index. Default: `this.columns`.
* @param array - Column to add.
*/
addColumn(index: number, array: number[] | AbstractMatrix): Matrix;
addColumn(index: number, array: number[] | AbstractMatrix): this;

/**
* Adds a new row to the matrix (in place).
* @param index - Row index. Default: `this.rows`.
* @param array - Row to add.
*/
addRow(index: number, array: number[] | AbstractMatrix): Matrix;
addRow(index: number, array: number[] | AbstractMatrix): this;
}

export default Matrix;
Expand Down

0 comments on commit 8010f31

Please sign in to comment.