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

Function upgradeChannel

packages/effect/src/unstable/http/HttpServerRequest.ts:174–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172 * @since 4.0.0
173 */
174export const upgradeChannel = <IE = never>(): Channel.Channel<
175 Arr.NonEmptyReadonlyArray<Uint8Array>,
176 HttpServerError | IE | Socket.SocketError,
177 void,
178 Arr.NonEmptyReadonlyArray<string | Uint8Array | Socket.CloseEvent>,
179 IE,
180 unknown,
181 HttpServerRequest
182> =>
183 HttpServerRequest.pipe(
184 Effect.flatMap((_) => _.upgrade),
185 Effect.map(Socket.toChannelWith<IE>()),
186 Channel.unwrap
187 )
188
189/**
190 * Decodes a schema from the cookies of the current request.

Callers

nothing calls this directly

Calls 2

pipeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected