import * as Config from "effect/Config"; import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import type { Scope } from "effect/Scope"; import type { HttpBodyError } from "effect/unstable/http/HttpBody"; import { type HttpServerError } from "effect/unstable/http/HttpServerError"; import { HttpServerRequest } from "effect/unstable/http/HttpServerRequest"; import * as HttpServerResponse from "effect/unstable/http/HttpServerResponse"; export type HttpEffect = Effect.Effect; /** * `effect`'s HttpEffect brands a request scope as "ejected" when ownership * is transferred to a consumer that outlives the handler's return — a * streaming response body, a WebSocket upgrade, an RPC stream. Bridges check * this before their close-on-return path: an ejected scope is closed by its * new owner when it finishes, not by the bridge. */ declare const scopeEjected: unique symbol; export declare const isScopeEjected: (scope: Scope) => scope is Scope & Record; export declare const serve: (handler: Effect.Effect) => Effect.Effect>; declare const HttpServer_base: Context.ServiceClass(handler: Effect.Effect, options?: { port?: number; }) => Effect.Effect | Scope>; }>; export declare class HttpServer extends HttpServer_base { } export declare const safeHttpEffect: (handler: HttpEffect | Effect.Effect>) => Effect.Effect; export declare const resolvePort: (options: { port?: number; } | undefined) => Config.Config | Effect.Effect; export interface BunHttpServerOptions { /** * Network interface on which the Bun HTTP server listens. * Omit to use Bun's default. */ hostname?: string; } export declare const BunHttpServer: (serverOptions?: BunHttpServerOptions) => Layer.Layer; export declare const NodeHttpServer: () => Layer.Layer; export {}; //# sourceMappingURL=Http.d.ts.map