MCPcopy Create free account
hub / github.com/Effect-TS/effect / addStreamContent

Function addStreamContent

packages/effect/src/unstable/httpapi/OpenApi.ts:821–840  ·  view source on GitHub ↗
(
    stream: HttpApiSchema.StreamSchema,
    status: number
  )

Source from the content-addressed store, hash-verified

819 }
820
821 function addStreamContent(
822 stream: HttpApiSchema.StreamSchema,
823 status: number
824 ) {
825 const statusMap = map.get(status)
826 if (statusMap === undefined) {
827 map.set(status, {
828 descriptions: new Set(),
829 content: undefined,
830 headers: [],
831 streamContent: new Map([[stream.contentType, stream]])
832 })
833 } else {
834 if (statusMap.streamContent === undefined) {
835 statusMap.streamContent = new Map([[stream.contentType, stream]])
836 } else {
837 statusMap.streamContent.set(stream.contentType, stream)
838 }
839 }
840 }
841}
842
843function resolveDescriptionOrIdentifier(ast: SchemaAST.AST): string | undefined {

Callers 1

processFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected