SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface ICellRegions

    The result of ICellRange.getRegions: a partition, and the features it partitioned on.

    A collection, not an iterator, and lazily backed. The features live here rather than on each member because the partition is what knows them — a renderer reads them once, and code handed the collection third-hand can still say what it is looking at. Nothing is computed until the collection is iterated or counted, so holding one costs nothing.

    The partition is over a live sheet, exactly as an ICellRanges is: the addresses are pointers, not a snapshot, and a write into a region after the fact can invalidate the uniformity it was yielded for. Take a snapshot if you need one — that is its own concept.

    interface ICellRegions {
        isICellRegions: true;
        "[iterator]"(): IterableIterator<ICellRegion>;
        getCount(): number;
        getFeatures(): readonly ICellRange.Feature[];
        getRange(): ICellRange;
    }

    Hierarchy

    Index
    isICellRegions: true

    For runtime type checking.

    • The number of regions in the partition.

      Returns number

      Materializes the partition (and memoizes it) — regions are O(blocks), not O(cells). The ratio against a cell count is the useful signal: regions ≈ cells means the feature varies continuously, and drilling further will not reduce anything.

    • The features this partition was built from — the provenance of every member's uniformity.

      Returns readonly ICellRange.Feature[]

      A region is uniform with respect to these, and says nothing about any other feature. This is what makes a member's payload interpretable by something that did not make the call.

    • The extent this partition was computed over — the range getRegions was called on.

      Returns ICellRange

      The partition is only interpretable against the extent that produced it. With the default containment: 'intersects', a stored block straddling the boundary is included clipped to this extent, so a member's address can be an artifact of where the caller drew the query rather than a fact about the sheet. Without it, a consumer cannot tell the two apart and will report a fragment as a block.

      ICellRegion.isClipped answers the question per member; this is the extent it is answered against, and what a renderer needs to say "clipped at the query edge" at all.