import type { CallableMap, CallableNest } from '@stackpress/lib'; import type { Infer, KnownPlugin, ServerAction, ServerProps, ServerGateway, ServerHandler, ServerOptions, NodeServerOptions, ConfigMap, PluginMap } from './types.js'; import type Request from './Request.js'; import type Response from './Response.js'; import Router from './Router.js'; import { PluginLoader } from './Loader.js'; export default class Server extends Router { readonly config: CallableNest; readonly loader: PluginLoader; readonly plugins: CallableMap; protected _gateway: ServerGateway; protected _handler: ServerHandler; set gateway(callback: ServerGateway); set handler(callback: ServerHandler); constructor(options?: ServerOptions); bootstrap(): Promise; create(options?: NodeServerOptions): import("node:http").Server; handle(request: R, response: S): Promise; props(req: Request, res: Response): ServerProps; plugin(name: K): V extends Infer ? KnownPlugin : V; register(name: K, config: V): Server; } export declare function gateway(server: Server): (options: NodeServerOptions) => import("node:http").Server; export declare function handler(_ctx: Server, _req: R, res: S): Promise; export declare function server(options?: ServerOptions): Server; export declare function router(): Router; export declare function action(action: ServerAction): ServerAction;