From c6f9011657afad13521262ed7268fb3b1e47374f Mon Sep 17 00:00:00 2001 From: Vitor Andrade Date: Mon, 20 Jan 2025 23:48:07 +0100 Subject: [PATCH] Add TypeScript support for ALB related types (ALBEvent, ALBEventRequestContext). --- index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index c23ae10..59f811d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,6 @@ import { + ALBEvent, + ALBEventRequestContext, APIGatewayEventRequestContext, APIGatewayProxyEvent, APIGatewayProxyEventV2, @@ -163,7 +165,7 @@ export declare class Request { body: any; rawBody: string; route: ''; - requestContext: APIGatewayEventRequestContext; + requestContext: APIGatewayEventRequestContext | ALBEventRequestContext; isBase64Encoded: boolean; pathParameters: { [name: string]: string } | null; stageVariables: { [name: string]: string } | null; @@ -343,12 +345,12 @@ export declare class API { finally(callback: FinallyFunction): void; run( - event: APIGatewayProxyEvent | APIGatewayProxyEventV2, + event: APIGatewayProxyEvent | APIGatewayProxyEventV2 | ALBEvent, context: Context, cb: (err: Error, result: any) => void ): void; run( - event: APIGatewayProxyEvent | APIGatewayProxyEventV2, + event: APIGatewayProxyEvent | APIGatewayProxyEventV2 | ALBEvent, context: Context ): Promise; }