MCPcopy Create free account
hub / github.com/arktypeio/arktype / walk

Function walk

ark/aot/scope.ts:878–880  ·  view source on GitHub ↗
(node: Node, visit: (node: Node) => boolean)

Source from the content-addressed store, hash-verified

876}
877
878export const walk = (node: Node, visit: (node: Node) => boolean): void => {
879 if (visit(node)) forEachChild(node, child => walk(child, visit))
880}
881
882const forEachChild = (node: Node, f: (child: Node) => void) => {
883 for (const k of visitorKeys[node.type]) {

Callers 15

serverExternalListsInFunction · 0.90
keepReadMethod · 0.90
callsBeforeFunction · 0.90
readPartsDirectlyFunction · 0.90
shareFailuresAsFunction · 0.90
functionsAsArrowsFunction · 0.90
isFactoryFunction · 0.90
markedByFunction · 0.90
dropNarrowSuppressionsOfFunction · 0.90
isPassableMethod · 0.90
transpiledEnumOfMethod · 0.90
declareUnsetMethod · 0.90

Calls 2

forEachChildFunction · 0.85
visitFunction · 0.70

Tested by

no test coverage detected