forEachChild

tcmts.core.ts.forEachChild · #ex5o3tfr · term · runs anywhere

A node's children, as ts.forEachChild gave them.

import type { Node, NodeArray } from "typescript/ast";

export function forEachChild<T>(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: NodeArray<Node>) => T): T | undefined {
  return node.forEachChild(cbNode, cbNodes);
}

used by