Skip to content

Commit 2ee0c04

Browse files
authoredJan 30, 2025
fix(typescript): add types for createLambdaFunction() (#132)
Add TypeScript support for Lambda Function URLs This PR adds types for Lambda function URLs. Details about Lambda function URLs can be found below: - https://aws.amazon.com/blogs/aws/announcing-aws-lambda-function-urls-built-in-https-endpoints-for-single-function-microservices/ - https://docs.aws.amazon.com/lambda/latest/dg/urls-configuration.html No changes should be necessary to the `createLambdaFunction` implementation since the expected arguments and return types are nearly identical.
1 parent e413b7b commit 2ee0c04

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed
 

‎index.d.ts

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {
33
APIGatewayProxyEvent,
44
APIGatewayProxyResult,
55
Context,
6+
LambdaFunctionURLEvent,
7+
LambdaFunctionURLResult,
68
} from "aws-lambda";
79
import { ApplicationFunction } from "probot/lib/types";
810

@@ -15,3 +17,11 @@ export function createLambdaFunction(
1517
event: APIGatewayProxyEvent,
1618
context: Context
1719
) => Promise<APIGatewayProxyResult>;
20+
21+
export function createLambdaFunction(
22+
app: ApplicationFunction,
23+
options: { probot: Probot }
24+
): (
25+
event: LambdaFunctionURLEvent,
26+
context: Context
27+
) => Promise<LambdaFunctionURLResult>;

‎package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"repository": "github:probot/adapter-aws-lambda-serverless",
1616
"dependencies": {
17-
"@types/aws-lambda": "^8.10.85",
17+
"@types/aws-lambda": "^8.10.147",
1818
"lowercase-keys": "^2.0.0",
1919
"probot": "^13.3.0"
2020
},

0 commit comments

Comments
 (0)