diff --git a/README.md b/README.md index d05bae8..daadc97 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,12 @@ If you're unfamiliar with now runtimes, please read the [runtime docs](https://z ```ts // api/hello.ts -import { APIGatewayEventRequestContext, APIGatewayEvent } from 'https://deno.land/x/lambda/mod.ts'; +import { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from 'https://deno.land/x/lambda/mod.ts'; -export async function handler(event: APIGatewayEvent, context: APIGatewayEventRequestContext) { +export async function handler( + event: APIGatewayProxyEvent, + context: Context +): Promise { return { statusCode: 200, body: `Welcome to deno ${Deno.version.deno} 🦕`, diff --git a/example/api/version.ts b/example/api/version.ts index 5ff6d7d..6de78cf 100644 --- a/example/api/version.ts +++ b/example/api/version.ts @@ -1,12 +1,13 @@ import { - APIGatewayEventRequestContext, - APIGatewayEvent, + APIGatewayProxyEvent, + APIGatewayProxyResult, + Context, } from 'https://deno.land/x/lambda/mod.ts'; export async function handler( - event: APIGatewayEvent, - context: APIGatewayEventRequestContext -) { + event: APIGatewayProxyEvent, + context: Context +): Promise { return { statusCode: 200, body: `Welcome to deno ${Deno.version.deno} 🦕`,