File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import path from 'path';
3
3
import _ from 'lodash' ;
4
4
import * as OpenApiValidator from 'express-openapi-validator' ;
5
5
import { OpenAPIFramework } from 'express-openapi-validator/dist/framework/index' ;
6
- import type { Handler , Request } from 'express' ;
6
+ import type { Handler , Request , RequestHandler } from 'express' ;
7
7
8
8
import type { AnyServiceLocals , ServiceExpress , ServiceLocals } from './types' ;
9
9
import { getNodeEnv } from './env' ;
@@ -99,7 +99,7 @@ export async function openApi<
99
99
`Could not find a [${ route . method } ] function in ${ modulePath } when trying to route [${ route . method } ${ route . expressRoute } ].` ,
100
100
) ;
101
101
}
102
- return module [ method ] ;
102
+ return module [ method ] as RequestHandler ;
103
103
} catch ( error ) {
104
104
app . locals . logger . error (
105
105
{
You can’t perform that action at this time.
0 commit comments