From f7afb75b2914aca13434e076e88d23ae38f76a26 Mon Sep 17 00:00:00 2001 From: Murat Corlu Date: Sun, 9 Feb 2020 20:56:46 +0100 Subject: [PATCH] fix: body property needed on Request Definition file --- src/request.d.ts | 3 ++- src/response.d.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/request.d.ts b/src/request.d.ts index 5f3686a..787db3f 100644 --- a/src/request.d.ts +++ b/src/request.d.ts @@ -4,8 +4,9 @@ import { Accepts } from 'accepts'; import { Readable } from 'stream'; import { IncomingMessage } from 'http'; -export interface Request extends IncomingMessage { +export class Request extends IncomingMessage { constructor(event: APIGatewayProxyEvent); + body: any; headers: { [name: string]: string }; hostname: string | null; method: string; diff --git a/src/response.d.ts b/src/response.d.ts index ce56ce7..1b1b257 100644 --- a/src/response.d.ts +++ b/src/response.d.ts @@ -2,7 +2,7 @@ import { Request } from "./request"; import { APIGatewayProxyCallback, APIGatewayProxyResult } from 'aws-lambda'; import { ServerResponse } from "http"; -export interface Response extends ServerResponse { +export class Response extends ServerResponse { /** * Response object constructor *