Merge pull request #4561 from hassankhan/update-aws-nodejs-typescript-template

Add type `APIGatewayEvent` to handler
This commit is contained in:
Frank Schmid 2017-12-12 10:21:38 +01:00 committed by GitHub
commit c6038feb46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import { Handler, Callback, Context } from 'aws-lambda';
import { APIGatewayEvent, Callback, Context, Handler } from 'aws-lambda';
export const hello : Handler = (event, context : Context, cb : Callback) => {
export const hello: Handler = (event: APIGatewayEvent, context: Context, cb: Callback) => {
const response = {
statusCode: 200,
body: JSON.stringify({
@ -10,4 +10,4 @@ export const hello : Handler = (event, context : Context, cb : Callback) => {
};
cb(null, response);
}
}