Runtime looks like this and works fine:
const res = {
end: o.spy()
}
await handler(req, res)
console.log("First call", res.end.calls[0])
//=> First call { this: <ref *1> { [omitted] }, args: [ 'ok' ] }
However, TS complains about further usage:
It thinks .calls is an array of arrays:
