Skip to content

Commit 647f010

Browse files
committed
fix: Proper type definition for returned callback
1 parent 3353eb0 commit 647f010

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"homepage": "https://github.com/muratcorlu/lambda-expressless#readme",
2222
"devDependencies": {
2323
"@types/accepts": "^1.3.5",
24-
"@types/aws-lambda": "^8.10.33",
24+
"@types/aws-lambda": "^8.10.40",
2525
"@types/connect": "^3.4.33",
2626
"body-parser": "^1.19.0",
2727
"jest": "^24.9.0",

src/lambda-wrapper.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { Request } from './request';
22
import { Response } from './response';
3-
import { APIGatewayProxyHandler } from 'aws-lambda';
3+
import { APIGatewayProxyEvent, Context, APIGatewayProxyResult } from 'aws-lambda';
44
import { NextFunction, NextHandleFunction } from "connect";
55

6+
export interface APIGatewayProxyHandler {
7+
(event: APIGatewayProxyEvent, context: Context): Promise<APIGatewayProxyResult>
8+
}
69

710
export interface Middleware extends NextHandleFunction {
811
(request: Request, response: Response, next: NextFunction): void

0 commit comments

Comments
 (0)