1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-11 01:33:58 +02:00

docs: add Span to documentation

This commit is contained in:
Sunny Hirai
2021-07-26 23:37:14 -07:00
parent 083a3da220
commit 06a376d727
3 changed files with 20 additions and 0 deletions

View File

@@ -11,3 +11,4 @@ type Location = Path | Point | Range
- [Point](./point.md)
- [PointEntry](./pointe-entry.md)
- [Range](./range.md)
- [Span](./span.md)

View File

@@ -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.