import type { IncomingMessage, Server, ServerResponse } from "node:http"; import Koa from "koa"; import type { DefaultContext, DefaultState, ParameterizedContext } from "koa"; import type { Router } from "router-segments"; import type { Config } from "./config"; import type { AlpLanguageContext } from "./language"; import type { AlpParamsContext, AlpParamsRequest } from "./params/index"; import type { AlpRouteRef, RouterContext as AlpRouterContext, UrlGenerator } from "./router"; import type { TranslateBaseContext, TranslateContext } from "./translate/index"; import type { Context as AlpContext, ContextState, NodeApplication, NodeConfig } from "./types"; export interface AlpNodeAppOptions { appDirname: string; packageDirname: string; config: Config & NodeConfig; certPath?: string; publicPath?: string; } declare module "koa" { interface DefaultState extends ContextState { } interface DefaultContext extends AlpContext, AlpParamsContext, AlpRouterContext, AlpLanguageContext, TranslateContext { } interface BaseContext extends AlpContext, TranslateBaseContext { urlGenerator: UrlGenerator; redirectTo:
>(to: string, params?: P) => void;
}
interface BaseRequest extends AlpParamsRequest {
}
}
export declare class AlpNodeApp extends Koa