Skip to content

Commit 1f9c70c

Browse files
feat(types): add TS support for ALB
Co-authored-by: Vitor Andrade <[email protected]>
1 parent 5edcd8a commit 1f9c70c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

index.d.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import {
2+
ALBEvent,
3+
ALBEventRequestContext,
24
APIGatewayEventRequestContext,
35
APIGatewayProxyEvent,
46
APIGatewayProxyEventV2,
@@ -163,7 +165,7 @@ export declare class Request {
163165
body: any;
164166
rawBody: string;
165167
route: '';
166-
requestContext: APIGatewayEventRequestContext;
168+
requestContext: APIGatewayEventRequestContext | ALBEventRequestContext;
167169
isBase64Encoded: boolean;
168170
pathParameters: { [name: string]: string } | null;
169171
stageVariables: { [name: string]: string } | null;
@@ -343,12 +345,12 @@ export declare class API {
343345
finally(callback: FinallyFunction): void;
344346

345347
run(
346-
event: APIGatewayProxyEvent | APIGatewayProxyEventV2,
348+
event: APIGatewayProxyEvent | APIGatewayProxyEventV2 | ALBEvent,
347349
context: Context,
348350
cb: (err: Error, result: any) => void
349351
): void;
350352
run(
351-
event: APIGatewayProxyEvent | APIGatewayProxyEventV2,
353+
event: APIGatewayProxyEvent | APIGatewayProxyEventV2 | ALBEvent,
352354
context: Context
353355
): Promise<any>;
354356
}

0 commit comments

Comments
 (0)