diff --git a/docs/Summary.md b/docs/Summary.md index 47390569a..ef9d61fa1 100644 --- a/docs/Summary.md +++ b/docs/Summary.md @@ -45,6 +45,7 @@ - [PointRef](api/locations/point-ref.md) - [Range](api/locations/range.md) - [RangeRef](api/locations/range-ref.md) + - [Span](api/locations/span.md) - [Operation](api/operation.md) ## Libraries diff --git a/docs/api/locations/README.md b/docs/api/locations/README.md index edc8aeda0..066bd8f6e 100644 --- a/docs/api/locations/README.md +++ b/docs/api/locations/README.md @@ -11,3 +11,4 @@ type Location = Path | Point | Range - [Point](./point.md) - [PointEntry](./pointe-entry.md) - [Range](./range.md) +- [Span](./span.md) diff --git a/docs/api/locations/span.md b/docs/api/locations/span.md new file mode 100644 index 000000000..0956fd8bb --- /dev/null +++ b/docs/api/locations/span.md @@ -0,0 +1,18 @@ +# Span + +A `Span` is a low-level way to refer to a range using `Element` as the end points instead of a `Point` which requires the use of leaf text nodes. + +```typescript +type Span = [Path, Path] +``` + +- [Static methods](range.md#static-methods) + - [Check methods](range.md#check-methods) + +## Static Methods + +### Check Methods + +#### `Span.isSpan(value: any) => value is Span` + +Check if a `value` implements the `Span` interface.