import { IncomingMessage, ServerResponse } from 'node:http'; import { Http2ServerRequest, Http2ServerResponse } from 'node:http2'; import { L as ListenOptions, a as Listener } from './shared/listhen.a192ecbb.js'; export { b as Certificate, C as CrossWSOptions, G as GetURLOptions, H as HTTPSOptions, d as ListenURL, S as Server, c as ShowURLOptions } from './shared/listhen.a192ecbb.js'; import { ConsolaInstance } from 'consola'; import * as crossws_adapters_node from 'crossws/adapters/node'; import * as jiti_lib_types from 'jiti/lib/types'; import 'node:https'; import 'node:net'; import 'get-port-please'; type RequestListenerHttp1x = typeof ServerResponse> = (req: InstanceType, res: InstanceType & { req: InstanceType; }) => void; type RequestListenerHttp2 = (request: InstanceType, response: InstanceType) => void; type RequestListener = RequestListenerHttp1x | RequestListenerHttp2; declare function listen(handle: RequestListener, _options?: Partial): Promise; interface DevServerOptions { cwd?: string; staticDirs?: string[]; logger?: ConsolaInstance; ws?: ListenOptions["ws"]; } type NodeListener = (req: IncomingMessage | Http2ServerRequest, res: ServerResponse | Http2ServerResponse) => void; declare function createDevServer(entry: string, options: DevServerOptions): Promise<{ cwd: string; resolver: { relative: (path: string) => string; formatRelative: (path: string) => string; import: (id: string, opts?: jiti_lib_types.JitiResolveOptions) => Promise; resolve: (id: string) => string; tryResolve: (id: string) => string | undefined; }; nodeListener: NodeListener; reload: (_initial?: boolean) => Promise; _ws: false | crossws_adapters_node.NodeOptions | ((req: IncomingMessage, head: Buffer) => void) | undefined; _entry: string | undefined; }>; interface WatchOptions extends DevServerOptions { cwd?: string; logger?: ConsolaInstance; ignore?: string[]; publicDirs?: string[]; } declare function listenAndWatch(entry: string, options: Partial): Promise; export { type DevServerOptions, ListenOptions, Listener, type WatchOptions, createDevServer, listen, listenAndWatch };