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

Function toResponse

packages/effect/src/unstable/http/HttpServerRespondable.ts:64–69  ·  view source on GitHub ↗
(self: Respondable)

Source from the content-addressed store, hash-verified

62 * @since 4.0.0
63 */
64export const toResponse = (self: Respondable): Effect.Effect<HttpServerResponse> => {
65 if (Response.isHttpServerResponse(self)) {
66 return Effect.succeed(self)
67 }
68 return Effect.orDie(self[symbol]())
69}
70
71/**
72 * Attempts to convert an unknown value into an `HttpServerResponse`, falling back

Callers

nothing calls this directly

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected