jeremydaly / lambda-api

Lightweight web framework for your serverless applications
https://serverless-api.com
MIT License
1.41k stars 125 forks source link

Typescript type for rawBody doesn't align with APIGatewayProxyEventBase body #209

Open LyndonHook opened 1 year ago

LyndonHook commented 1 year ago

The REQUEST.rawBody is the same as the lambda event body which should be string | null but is defined as string in the type definition.

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/aws-lambda/trigger/api-gateway-proxy.d.ts#L117

https://github.com/jeremydaly/lambda-api/blob/main/index.d.ts#L146

Can it be updated to match? I'm happy to raise pull request.

naorpeled commented 1 year ago

Hey @LyndonHook, thanks for opening this issue and sorry for the delayed response.

Feel free to open a PR that resolves this :) If you'd like me to do so, let me know.