1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 17:39:57 +02:00

docs: Organize Element docs into sections

This commit is contained in:
Sunny Hirai
2021-03-29 23:35:08 -07:00
parent f0bcc8be83
commit 04da58d653

View File

@@ -11,6 +11,14 @@ interface Element {
## Static methods ## Static methods
### Retrieval methods
###### `Element.matches(element: Element, props: Partial<Element>): boolean`
Check if an element matches a set of `props`. Note: This checks custom properties, but it does not ensure that any children are equivalent.
### Check methods
###### `Element.isElement(value: any): value is Element` ###### `Element.isElement(value: any): value is Element`
Check if a `value` implements the `Element` interface. Check if a `value` implements the `Element` interface.
@@ -18,7 +26,3 @@ Check if a `value` implements the `Element` interface.
###### `Element.isElementList(value: any): value is Element[]` ###### `Element.isElementList(value: any): value is Element[]`
Check if a `value` is an array of `Element` objects. Check if a `value` is an array of `Element` objects.
###### `Element.matches(element: Element, props: Partial<Element>): boolean`
Check if an element matches a set of `props`. Note: This checks custom properties, but it does not ensure that any children are equivalent.