From 0e598ab229febdc1ac576e671e8be7ae8085f3ad Mon Sep 17 00:00:00 2001 From: Horacio Herrera Date: Wed, 13 Apr 2022 19:56:59 +0200 Subject: [PATCH] feat(docs): add missing Element methods (#4943) --- docs/api/nodes/element.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/api/nodes/element.md b/docs/api/nodes/element.md index d125e2f4c..44fb63325 100644 --- a/docs/api/nodes/element.md +++ b/docs/api/nodes/element.md @@ -60,6 +60,10 @@ Check if an element matches a set of `props`. Note: This checks custom propertie ### Check methods +#### `Element.isAncestor(value: any) => value is Ancestor` + +Check if a value implements the 'Ancestor' interface. + #### `Element.isElement(value: any) => value is Element` Check if a `value` implements the `Element` interface. @@ -67,3 +71,8 @@ Check if a `value` implements the `Element` interface. #### `Element.isElementList(value: any) => value is Element[]` Check if a `value` is an array of `Element` objects. + +#### `Element.isElementType(value: any, elementVal: string, ElementKey: string = 'type'): value is T` + +Check if a value implements the `Element` interface and has elementKey with selected value. +Default it check to `type` key value