( declaration: HttpApiSchema.StreamSse<Sse.EventCodec, Schema.Constraint, unknown> )
| 890 | } |
| 891 | |
| 892 | function makeSseDecoder( |
| 893 | declaration: HttpApiSchema.StreamSse<Sse.EventCodec, Schema.Constraint, unknown> |
| 894 | ) { |
| 895 | const Event = Schema.Union([ |
| 896 | Schema.Struct({ |
| 897 | event: Schema.Literal(reservedStreamFailureEvent), |
| 898 | data: Schema.fromJsonString(Schema.toCodecJson(Schema.Cause(declaration.error, Schema.Defect()))) |
| 899 | }), |
| 900 | declaration.events |
| 901 | ]) |
| 902 | return Sse.decodeSchema(Event) |
| 903 | } |
| 904 | |
| 905 | function decodeSseStream( |
| 906 | stream: Stream.Stream<Uint8Array, HttpClientError.HttpClientError>, |
no test coverage detected