Experimenting with Router definition

This commit is contained in:
George Valotasios
2013-12-10 11:05:18 +01:00
parent 4cc9beb405
commit cb2beb72e4
2 changed files with 19 additions and 0 deletions
+8
View File
@@ -62,6 +62,14 @@ declare module "express" {
new (method: string, path: string, callbacks: Function[], options: any): Route;
}
export class Router {
new (options: any): Router;
middleware (): any;
get(path: string, ...handlers: RequestFunction[]): Router;
}
interface Handler {
(req: Request, res: Response, next?: Function): void;
}