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

getBlock

getBlock(snapshot, path): { node: PortableTextBlock; path: Path; } | undefined

Defined in: is-block.ts:37

Get the node at the given path if it is a block.

Returns the node narrowed to PortableTextBlock, or undefined if the node doesn’t exist or is not a block.

TraversalSnapshot

Path

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