requireGridRangeSameDimensions
function requireGridRangeSameDimensions(
range1: GridRange,
range2: GridRange,
message?: string
): void;
The assertion form of isGridRangeSameDimensions. The default message states both sizes, so a mismatched copy says how far off it was.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The first range. |
|
| The second range. |
|
| The message of the exception. A default stating both sizes is used when omitted. |
Returns
void — the first range, unchanged.
Throws
Exception | Condition |
|---|---|
| the two ranges are not the same size. |
Examples
Guarding a copy
const source = { startRowIndex: 0, endRowIndex: 2, startColumnIndex: 0, endColumnIndex: 2 };
const target = { startRowIndex: 5, endRowIndex: 7, startColumnIndex: 5, endColumnIndex: 7 };
requireGridRangeSameDimensions(source, target); // => the source range
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.