1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 18:09:49 +02:00

docs: Add fat arrows to Text API

This commit is contained in:
Sunny Hirai
2021-05-26 00:16:24 -07:00
parent c1496f4729
commit 708372c745

View File

@@ -16,22 +16,22 @@ interface Text {
### Retrieval methods ### Retrieval methods
#### `Text.matches(text: Text, props: Partial<Text>): boolean` #### `Text.matches(text: Text, props: Partial<Text>) => boolean`
Check if a `text` matches a set of `props`. Check if a `text` matches a set of `props`.
#### `Text.decorations(node: Text, decorations: Range[]): Text[]` #### `Text.decorations(node: Text, decorations: Range[]) => Text[]`
Get the leaves for a text node, given `decorations`. Get the leaves for a text node, given `decorations`.
### Check methods ### Check methods
#### `Text.equals(text: Text, another: Text, options?): boolean` #### `Text.equals(text: Text, another: Text, options?) => boolean`
Check if two text nodes are equal. Check if two text nodes are equal.
Options: `{loose?: boolean}` Options: `{loose?: boolean}`
#### `Text.isText(value: any): value is Text` #### `Text.isText(value: any) => value is Text`
Check if a `value` implements the `Text` interface. Check if a `value` implements the `Text` interface.