@univerjscorefunctionsGetintersectrange

@univerjs/core v0.5.0-beta.1Docs


Function: getIntersectRange()

function getIntersectRange(src, target): Nullable<IRange>

Computes the intersection of two ranges. If there is an overlap between the two ranges, returns a new range representing the intersection. If there is no overlap, returns null.

Parameters

ParameterTypeDescription
srcIRangeThe source range.
targetIRangeThe target range.

Returns

Nullable<IRange>

The intersected range or null if there is no intersection.

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/range.ts:268