Closed ghost closed 2 years ago
This is actually valid JavaScript:
import { composeHandler } from "@lambda-middleware/compose"
import { doNotWait } from "@lambda-middleware/do-not-wait"
export const handler = composeHandler(
doNotWait(),
async (evt, ctx) => {
ctx.callbackWaitsForEmptyEventLoop = false
return {
body: 'OK',
statusCode: 200
}
}
)
So typing it as true
would not be correct.
It's not a really bug, but a type issue, and even that I'm not really sure.
Describe the bug
A clear and concise description of what the bug is. When
doNotWait
middleware is used incomposeHandler
, the type forcontext.callbackWaitsForEmptyEventLoop
should betrue
, notboolean
.To Reproduce
The following minimal code reproduces the error:
Expected behavior
A clear and concise description of what you expected to happen. It to be typed true.
Additional context
Add any other context about the problem here.