mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Merge pull request #4561 from hassankhan/update-aws-nodejs-typescript-template
Add type `APIGatewayEvent` to handler
This commit is contained in:
commit
c6038feb46
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user