js-yaml - v5.3.0
    Preparing search index...

    Interface VisitContext

    Traversal-derived position of the current node. Kept off the node itself: a node may sit in several places (alias/dedup reuse), so depth/role belong to the walk, not the node. VisitContext.parent kind + VisitContext.isKey pin the exact slot.

    interface VisitContext {
        depth: number;
        parent: Node | null;
        isKey: boolean;
    }
    Index

    0 = document content root

    Enclosing sequence/mapping, null at the root

    Node sits in a mapping key position