mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #8679 from kimamula/fix_express_NextFunction
fix express.NextFunction
This commit is contained in:
@@ -783,8 +783,7 @@ declare module "express-serve-static-core" {
|
||||
}
|
||||
|
||||
interface NextFunction {
|
||||
(): void;
|
||||
(err: any): void;
|
||||
(err?: any): void;
|
||||
}
|
||||
|
||||
interface ErrorRequestHandler {
|
||||
|
||||
@@ -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) => {};
|
||||
|
||||
Reference in New Issue
Block a user