Closed G-Rath closed 2 years ago
Hello, I have the same question. Was there a reason to add the undefined
to types? Since it does not correspond to the AWS lambda types. Of course, this is easy to fix through casting, but it slightly increases the code and constantly needs to do it for each function.
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)@sentry/serverless
Version:
Description
https://github.com/getsentry/sentry-javascript/blob/ce40962d91117a675ec7440d3f7e4015f33b95ad/packages/serverless/src/awslambda.ts#L180-L183
By doing
| undefined
, the result is not assignable to a handler from@types/aws-lambda
.i.e:
This produces this error: