fix express.NextFunction

This commit is contained in:
Kenji-Imamura
2016-03-22 12:58:42 +09:00
parent 6766ed1d0f
commit fb2e78984b
2 changed files with 4 additions and 2 deletions
+1 -2
View File
@@ -783,8 +783,7 @@ declare module "express-serve-static-core" {
}
interface NextFunction {
(): void;
(err: any): void;
(err?: any): void;
}
interface ErrorRequestHandler {
+3
View File
@@ -68,3 +68,6 @@ app.use((req, res, next) => {
app.use(router);
app.listen(3000);
const next: express.NextFunction = () => {};
const nextWithArgument: express.NextFunction = (err: any) => {};