This page is available as Markdown at /api/traversal/functions/getannotation.md. For the full documentation index, see /llms.txt, or the complete corpus at /llms-full.txt.
getAnnotation
getAnnotation(
snapshot,path): {node:PortableTextObject;path:Path; } |undefined
Defined in: get-annotation.ts:18
Get the annotation at a given path.
Annotations live in markDefs on a text block, alongside children
rather than inside it, so they aren’t reachable through getNode.
getAnnotation resolves a path of the shape
[..., {_key: block}, 'markDefs', {_key: annotation}, ...] to the
annotation node on the enclosing text block.
Parameters
Section titled “Parameters”snapshot
Section titled “snapshot”TraversalSnapshot
Path
Returns
Section titled “Returns”{ node: PortableTextObject; path: Path; } | undefined