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

Class FieldImpl

packages/platform/node/src/NodeMultipart.ts:109–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109class FieldImpl extends PartBase implements Multipart.Field {
110 readonly _tag = "Field"
111 readonly key: string
112 readonly contentType: string
113 readonly value: string
114
115 constructor(
116 info: MultipartParser.PartInfo,
117 value: Uint8Array
118 ) {
119 super()
120 this.key = info.name
121 this.contentType = info.contentType
122 this.value = MultipartParser.decodeField(info, value)
123 }
124
125 toJSON(): unknown {
126 return {
127 _id: "@effect/platform/Multipart/Part",
128 _tag: "Field",
129 key: this.key,
130 value: this.value,
131 contentType: this.contentType
132 }
133 }
134}
135
136class FileImpl extends PartBase implements Multipart.File {
137 readonly _tag = "File"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected