Skip to content

Commit

Permalink
fix: Proper type definition for returned callback
Browse files Browse the repository at this point in the history
  • Loading branch information
muratcorlu committed Jan 31, 2020
1 parent 3353eb0 commit 647f010
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"homepage": "https://github.com/muratcorlu/lambda-expressless#readme",
"devDependencies": {
"@types/accepts": "^1.3.5",
"@types/aws-lambda": "^8.10.33",
"@types/aws-lambda": "^8.10.40",
"@types/connect": "^3.4.33",
"body-parser": "^1.19.0",
"jest": "^24.9.0",
Expand Down
5 changes: 4 additions & 1 deletion src/lambda-wrapper.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Request } from './request';
import { Response } from './response';
import { APIGatewayProxyHandler } from 'aws-lambda';
import { APIGatewayProxyEvent, Context, APIGatewayProxyResult } from 'aws-lambda';
import { NextFunction, NextHandleFunction } from "connect";

export interface APIGatewayProxyHandler {
(event: APIGatewayProxyEvent, context: Context): Promise<APIGatewayProxyResult>
}

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

0 comments on commit 647f010

Please sign in to comment.