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

Function typeOf

packages/httpapi-codegen/src/index.ts:426–433  ·  view source on GitHub ↗
(schema: Schema.Top, decoded = false)

Source from the content-addressed store, hash-verified

424) {
425 const types = new Map<SchemaAST.AST, string>()
426 const typeOf = (schema: Schema.Top, decoded = false) => {
427 const projected = decoded ? Schema.toType(schema) : Schema.toEncoded(schema)
428 const cached = types.get(projected.ast)
429 if (cached !== undefined) return cached
430 const type = structuralType(projected)
431 types.set(projected.ast, type)
432 return type
433 }
434 const errors = new Map(
435 groups.flatMap((group) =>
436 group.endpoints.flatMap((endpoint) =>

Callers 1

renderPromiseTypesFunction · 0.85

Calls 3

structuralTypeFunction · 0.85
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected