Skip to content

Commit 1ffe3f5

Browse files
committed
fix(cast): fix types for openapi resolvers
1 parent 3983158 commit 1ffe3f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openapi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path';
33
import _ from 'lodash';
44
import * as OpenApiValidator from 'express-openapi-validator';
55
import { OpenAPIFramework } from 'express-openapi-validator/dist/framework/index';
6-
import type { Handler, Request } from 'express';
6+
import type { Handler, Request, RequestHandler } from 'express';
77

88
import type { AnyServiceLocals, ServiceExpress, ServiceLocals } from './types';
99
import { getNodeEnv } from './env';
@@ -99,7 +99,7 @@ export async function openApi<
9999
`Could not find a [${route.method}] function in ${modulePath} when trying to route [${route.method} ${route.expressRoute}].`,
100100
);
101101
}
102-
return module[method];
102+
return module[method] as RequestHandler;
103103
} catch (error) {
104104
app.locals.logger.error(
105105
{

0 commit comments

Comments
 (0)