From 6a0dd6fb80d7045a5e9d8950a0e0a39714c36aa9 Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Wed, 5 Jul 2023 14:57:24 -0400 Subject: [PATCH] fix(types): correct type for `createLambdaFunction` (#117) Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com> --- .github/workflows/test.yml | 8 ++++++-- index.d.ts | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eaa3ab5..2c712b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,10 @@ name: Test - -on: [push] +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize] jobs: test_matrix: diff --git a/index.d.ts b/index.d.ts index c3d04d1..2dc6ca8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,9 @@ import { Probot } from "probot"; -import { APIGatewayProxyHandler } from "aws-lambda"; +import { + APIGatewayProxyEvent, + APIGatewayProxyResult, + Context, +} from "aws-lambda"; import { ApplicationFunction } from "probot/lib/types"; export * from "probot"; @@ -7,4 +11,7 @@ export * from "probot"; export function createLambdaFunction( app: ApplicationFunction, options: { probot: Probot } -): APIGatewayProxyHandler; +): ( + event: APIGatewayProxyEvent, + context: Context +) => Promise;