Skip to content

Type Editor


Type Editor / @type-editor/tables / utils/query / FindNodeResult

Interface: FindNodeResult

Defined in: tables/src/utils/query.ts:28

Result of finding a parent node that matches a predicate.

This interface provides comprehensive information about a found node, including its position in the document and its depth in the node tree.

Properties

PropertyTypeDescriptionDefined in
depthnumberThe depth of the node in the document tree. The root document has depth 0, and each nested level increases by 1.tables/src/utils/query.ts:50
nodeNode_2The closest parent node that satisfies the predicate.tables/src/utils/query.ts:32
posnumberThe position directly before the node. For the root node (depth 0), this is always 0.tables/src/utils/query.ts:38
startnumberThe position at the start of the node's content. This is the position immediately after the opening of the node.tables/src/utils/query.ts:44