mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Experimenting with Router definition
This commit is contained in:
Vendored
+8
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user