Skip to content
This page is available as Markdown at /api/traversal/functions/getleaf.md. For the full documentation index, see /llms.txt, or the complete corpus at /llms-full.txt.

getLeaf

getLeaf(snapshot, path, options): { node: Node; path: Path; } | undefined

Defined in: get-leaf.ts:14

Get the deepest leaf node starting from a path, walking toward either the start or end edge. A leaf is any node that has no children according to the traversal context.

TraversalSnapshot

Path

"start" | "end"

{ node: Node; path: Path; } | undefined