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

Method constructor

packages/effect/src/unstable/http/Multipart.ts:595–608  ·  view source on GitHub ↗
(
    info: MP.PartInfo,
    channel: Channel.Channel<Arr.NonEmptyReadonlyArray<Uint8Array>>
  )

Source from the content-addressed store, hash-verified

593 readonly contentEffect: Effect.Effect<Uint8Array, MultipartError>
594
595 constructor(
596 info: MP.PartInfo,
597 channel: Channel.Channel<Arr.NonEmptyReadonlyArray<Uint8Array>>
598 ) {
599 super()
600 this.key = info.name
601 this.name = info.filename ?? info.name
602 this.contentType = info.contentType
603 this.content = Stream.fromChannel(channel)
604 this.contentEffect = channel.pipe(
605 Channel.mkUint8Array,
606 Effect.mapError((cause) => MultipartError.fromReason("InternalError", cause))
607 )
608 }
609
610 toJSON(): unknown {
611 return {

Callers

nothing calls this directly

Calls 2

pipeMethod · 0.65
fromReasonMethod · 0.45

Tested by

no test coverage detected