MCPcopy Index your code
hub / github.com/anomalyco/opencode / visit

Function visit

packages/httpapi-codegen/src/index.ts:813–822  ·  view source on GitHub ↗
(ast: SchemaAST.AST)

Source from the content-addressed store, hash-verified

811 const visiting = new Set<SchemaAST.AST>()
812 const taggedError = taggedErrorFields(schema)
813 const visit = (ast: SchemaAST.AST): boolean => {
814 const cached = portable.get(ast)
815 if (cached !== undefined) return cached
816 if (visiting.has(ast)) return true
817 visiting.add(ast)
818 const result = visitCurrent(ast)
819 visiting.delete(ast)
820 portable.set(ast, result)
821 return result
822 }
823 const visitCurrent = (ast: SchemaAST.AST): boolean => {
824 if (!annotationsPortable(ast.annotations)) return false
825 if (!checksPortable(ast.checks) || ("encodingChecks" in ast && !checksPortable(ast.encodingChecks))) return false

Callers 2

visitCurrentFunction · 0.70
assertPortableFunction · 0.70

Calls 5

visitCurrentFunction · 0.85
getMethod · 0.65
addMethod · 0.65
deleteMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected