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:
@@ -11,3 +11,4 @@ type Location = Path | Point | Range
|
||||
- [Point](./point.md)
|
||||
- [PointEntry](./pointe-entry.md)
|
||||
- [Range](./range.md)
|
||||
- [Span](./span.md)
|
||||
|
18
docs/api/locations/span.md
Normal file
18
docs/api/locations/span.md
Normal 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.
|
Reference in New Issue
Block a user