import { Trouter } from './Trouter'; import { Middleware } from './middleware'; import { IncomingMessage, ServerResponse } from './http'; export type OnErrorHandler = (err: any, req: IncomingMessage, res: ServerResponse, next: () => void) => void; export 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); apps: object; //wares: Array; //bwares: object; parse(req: IncomingMessage): any; server: any; onError: any; onNoMatch: any; }