> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# comparePoints

> **comparePoints**(`snapshot`, `pointA`, `pointB`): `-1` \| `0` \| `1`

Defined in: compare-points.ts:17

Returns:

- `-1` if `pointA` is before `pointB`
- `0` if `pointA` and `pointB` are equal
- `1` if `pointA` is after `pointB`.

Compares the two points by document order, resolved at any depth. When
the paths are equal, compares offsets.

## Parameters

### snapshot

`TraversalSnapshot`

### pointA

`EditorSelectionPoint`

### pointB

`EditorSelectionPoint`

## Returns

`-1` \| `0` \| `1`