Function: getProgramNode()
function getProgramNode(node: Readonly<Node>): Readonly<Program> | null;
Defined in: _internal/ast-node.ts:44
Walks the parent chain to locate the enclosing Program node.
Parametersโ
nodeโ
Readonly<Node>
Starting AST node.
Returnsโ
| Readonly<Program>
| null
Nearest enclosing Program node; otherwise null when no program
boundary can be reached (including cycle-guard termination).