Skip to content

Commit eccd1b9

Browse files
committed
fix(azure-http-adapter): omit methods for backwards compatibility
1 parent fec7982 commit eccd1b9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/azure-http.adapter.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ export class AzureHttpAdapterStatic {
1515
if (handler) {
1616
return handler(context, req);
1717
}
18-
this.createHandler(createApp).then(fn => fn(context, req));
18+
this.createHandler(createApp).then((fn) => fn(context, req));
1919
}
2020

21-
private async createHandler(createApp: () => Promise<INestApplication>) {
21+
private async createHandler(
22+
createApp: () => Promise<
23+
Omit<INestApplication, 'startAllMicroservicesAsync' | 'listenAsync'>
24+
>
25+
) {
2226
const app = await createApp();
2327
const adapter = app.getHttpAdapter();
2428
if (this.hasGetTypeMethod(adapter) && adapter.getType() === 'azure-http') {
25-
return ((adapter as any) as AzureHttpRouter).handle.bind(adapter);
29+
return (adapter as any as AzureHttpRouter).handle.bind(adapter);
2630
}
2731
const instance = app.getHttpAdapter().getInstance();
2832
handler = createHandlerAdapter(instance);

0 commit comments

Comments
 (0)