import { Middleware } from './middleware'; import { IncomingMessage, ServerResponse } from './http'; export declare type OnErrorHandler = (err: any, req: IncomingMessage, res: ServerResponse, next: () => void) => void; export declare type OnNoMatchHandler = (req: IncomingMessage, res: ServerResponse) => void; export interface Polka { use(base: string | Middleware, ...fns: Middleware[]): Polka; listen(port: number, hostname: string): Promise; handler(req: IncomingMessage, res: ServerResponse, info?: string): any; apps: object; parse(req: IncomingMessage): any; server: any; onError: any; onNoMatch: any; }