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

Function streamDataAst

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

Source from the content-addressed store, hash-verified

993}
994
995function streamDataAst(ast: SchemaAST.AST) {
996 if (!SchemaAST.isObjects(ast)) throw new GenerationError({ reason: "Invalid SSE data schema" })
997 const data = ast.propertySignatures.find((field) => field.name === "data")?.type
998 if (data === undefined) throw new GenerationError({ reason: "Invalid SSE data schema" })
999 return data
1000}
1001
1002function streamEffectPortable(schema: Schema.Top) {
1003 if (!isStreamSchema(schema) || schema._tag === "StreamUint8Array" || schema.sseMode === "events") return true

Callers 2

streamDataSchemaFunction · 0.85
streamEncodedDataSchemaFunction · 0.85

Calls 1

findMethod · 0.65

Tested by

no test coverage detected