Skip to content

Commit 503685f

Browse files
committed
fix: export handler, target ES version
1 parent 7f1bb36 commit 503685f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/lambda-wrapper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface OnFinishedHandler {
1919
* @public
2020
*/
2121

22-
exports.ApiGatewayHandler = (router: Middleware, onFinished: OnFinishedHandler) => {
22+
const ApiGatewayHandler = (router: Middleware, onFinished: OnFinishedHandler) => {
2323
/**
2424
* Lambda Handler for API Gateway invocations
2525
*
@@ -58,3 +58,6 @@ exports.ApiGatewayHandler = (router: Middleware, onFinished: OnFinishedHandler)
5858
}
5959
return handleApiGatewayEvent
6060
}
61+
62+
export default { ApiGatewayHandler }
63+
module.exports = { ApiGatewayHandler }

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"compilerOptions": {
33
"outDir": "./dist",
44
"allowJs": true,
5-
"target": "ES2015",
6-
"lib": ["es2018"],
5+
"target": "ES2019",
6+
"lib": ["es2020"],
77
"forceConsistentCasingInFileNames": true,
88
"noImplicitReturns": true,
99
"strict": true,

0 commit comments

Comments
 (0)