@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 20 lines 662 Bytes
Raw
1 /**
2 * Accessor for the web-standard request behind a Deno HTTP server request.
3 *
4 * Unlike Bun's accessor, this function has no route-pattern generic because
5 * `Deno.serve` always receives a standard `Request`. Connection information is
6 * intentionally kept internal to `DenoHttpServer`.
7 *
8 * @stability unstable
9 * @since 4.0.0
10 */
11 import type { HttpServerRequest } from "effect/http/HttpServerRequest"
12
13 /**
14 * Returns the underlying web-standard `Request` from an Effect `HttpServerRequest`.
15 *
16 * @stability unstable
17 * @category accessors
18 * @since 4.0.0
19 */
20 export const toDenoServerRequest = (self: HttpServerRequest): Request => (self as any).source