diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..c3d04d1 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,10 @@ +import { Probot } from "probot"; +import { APIGatewayProxyHandler } from "aws-lambda"; +import { ApplicationFunction } from "probot/lib/types"; + +export * from "probot"; + +export function createLambdaFunction( + app: ApplicationFunction, + options: { probot: Probot } +): APIGatewayProxyHandler; diff --git a/package-lock.json b/package-lock.json index f422cc4..9d97ab8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1246,6 +1246,12 @@ "defer-to-connect": "^1.0.1" } }, + "@types/aws-lambda": { + "version": "8.10.85", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.85.tgz", + "integrity": "sha512-cMRXVxb+NMb6EekKel1fPBfz2ZqE5cGhIS14G7FVUM4Bqilx0lHKnZbsDLWLSeckDpkvlp5six2F7UWyEEJSoQ==", + "dev": true + }, "@types/babel__core": { "version": "7.1.12", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", diff --git a/package.json b/package.json index 207fe55..fa3fbb9 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ }, "description": "An extension for running Probot in AWS Lambda", "main": "index.js", + "types": "index.d.ts", "scripts": { "lint": "prettier --check '*.{js,md,json}' 'test/**/*.{js,json}' '.github/**/*.yml'", "lint:fix": "prettier --write '*.{js,md,json}' 'test/**/*.{js,json}' '.github/**/*.yml'", @@ -14,6 +15,7 @@ "repository": "github:probot/adapter-aws-lambda-serverless", "dependencies": { "@probot/get-private-key": "^1.1.0", + "@types/aws-lambda": "^8.10.85", "probot": "^11.0.6", "lowercase-keys": "^2.0.0" },