Skip to content

Commit

Permalink
Add references to the description of the array of changes to the API …
Browse files Browse the repository at this point in the history
…reference of all the methods that return ExportedChange[]
  • Loading branch information
sequba committed Nov 28, 2023
1 parent 5a70b8a commit 26784c9
Showing 1 changed file with 48 additions and 2 deletions.
50 changes: 48 additions & 2 deletions src/HyperFormula.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Undo the previous operation.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @fires [[valuesUpdated]] if recalculation was triggered by this change
Expand Down Expand Up @@ -1076,6 +1078,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Re-do recently undone operation.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @fires [[valuesUpdated]] if recalculation was triggered by this change
Expand Down Expand Up @@ -1200,6 +1204,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Sets the content for a block of cells of a given coordinates.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {SimpleCellAddress} topLeftCornerAddress - top left corner of block of cells
Expand Down Expand Up @@ -1236,6 +1242,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Reorders rows of a sheet according to a source-target mapping.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - ID of a sheet to operate on
Expand Down Expand Up @@ -1325,6 +1333,8 @@ export class HyperFormula implements TypedEmitter {
* Parameter `newRowOrder` should have a form `[ newPositionForRow0, newPositionForRow1, newPositionForRow2, ... ]`.
* This method might be used to [sort the rows of a sheet](../../guide/sorting-data.md).
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note: This method may trigger dependency graph recalculation.
*
* @param {number} sheetId - ID of a sheet to operate on
Expand Down Expand Up @@ -1401,6 +1411,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Reorders columns of a sheet according to a source-target mapping.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - ID of a sheet to operate on
Expand Down Expand Up @@ -1486,6 +1498,8 @@ export class HyperFormula implements TypedEmitter {
* Parameter `newColumnOrder` should have a form `[ newPositionForColumn0, newPositionForColumn1, newPositionForColumn2, ... ]`.
* This method might be used to [sort the columns of a sheet](../../guide/sorting-data.md).
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note: This method may trigger dependency graph recalculation.
*
* @param {number} sheetId - ID of a sheet to operate on
Expand Down Expand Up @@ -1594,6 +1608,8 @@ export class HyperFormula implements TypedEmitter {
* Adds multiple rows into a specified position in a given sheet.
* Does nothing if rows are outside effective sheet size.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - sheet ID in which rows will be added
Expand Down Expand Up @@ -1665,6 +1681,8 @@ export class HyperFormula implements TypedEmitter {
* Removes multiple rows from a specified position in a given sheet.
* Does nothing if rows are outside the effective sheet size.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - sheet ID from which rows will be removed
Expand Down Expand Up @@ -1734,6 +1752,8 @@ export class HyperFormula implements TypedEmitter {
* Adds multiple columns into a specified position in a given sheet.
* Does nothing if the columns are outside the effective sheet size.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - sheet ID in which columns will be added
Expand Down Expand Up @@ -1808,6 +1828,8 @@ export class HyperFormula implements TypedEmitter {
* Removes multiple columns from a specified position in a given sheet.
* Does nothing if columns are outside the effective sheet size.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - sheet ID from which columns will be removed
Expand Down Expand Up @@ -1891,6 +1913,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Moves the content of a cell block from source to the target location.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {SimpleCellRange} source - range for a moved block
Expand Down Expand Up @@ -1982,6 +2006,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Moves a particular number of rows to a specified position in a given sheet.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - a sheet number in which the operation will be performed
Expand Down Expand Up @@ -2062,6 +2088,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Moves a particular number of columns to a specified position in a given sheet.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - a sheet number in which the operation will be performed
Expand Down Expand Up @@ -2185,6 +2213,8 @@ export class HyperFormula implements TypedEmitter {
* When called after [[cut]] it performs [[moveCells]] operation into the cell block.
* Does nothing if the clipboard is empty.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {SimpleCellAddress} targetLeftCorner - upper left address of the target cell block
Expand Down Expand Up @@ -2579,6 +2609,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Removes a sheet
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - sheet ID.
Expand Down Expand Up @@ -2651,6 +2683,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Clears the sheet content. Double-checks if the sheet exists.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {number} sheetId - sheet ID.
Expand Down Expand Up @@ -2722,6 +2756,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Replaces the sheet content with new values.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* @param {number} sheetId - sheet ID.
* @param {RawCellContent[][]} values - array of new values
*
Expand Down Expand Up @@ -3387,8 +3423,10 @@ export class HyperFormula implements TypedEmitter {
/**
* Runs multiple operations and recomputes formulas at the end.
*
* Note that this method may trigger dependency graph recalculation.
* Returns [an array of cells whose values changed as a result of all batched operations](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
**
* @param {() => void} batchOperations - a function with operations to be performed
*
* @fires [[valuesUpdated]] if recalculation was triggered by this change
Expand Down Expand Up @@ -3467,7 +3505,7 @@ export class HyperFormula implements TypedEmitter {

/**
* Resumes the dependency graph recalculation that was suspended with [[suspendEvaluation]].
* It also triggers the recalculation and returns changes that are a result of all batched operations.
* It also triggers the recalculation and returns [an array of cells whose values changed as a result of all batched operations](/guide/basic-operations.md#changes-array).
*
* @fires [[valuesUpdated]] if recalculation was triggered by this change
* @fires [[evaluationResumed]] after the recomputation of necessary values
Expand Down Expand Up @@ -3567,6 +3605,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Adds a specified named expression.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {string} expressionName - a name of the expression to be added
Expand Down Expand Up @@ -3785,6 +3825,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Changes a given named expression to a specified formula.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {string} expressionName - an expression name, case-insensitive.
Expand Down Expand Up @@ -3867,6 +3909,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Removes a named expression.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @param {string} expressionName - expression name, case-insensitive.
Expand Down Expand Up @@ -4374,6 +4418,8 @@ export class HyperFormula implements TypedEmitter {
/**
* Runs a recomputation starting from recently changed vertices.
*
* Returns [an array of cells whose values changed as a result of this operation](/guide/basic-operations.md#changes-array).
*
* Note that this method may trigger dependency graph recalculation.
*
* @fires [[valuesUpdated]] if recalculation was triggered by this change
Expand Down

0 comments on commit 26784c9

Please sign in to comment.