This PR fixes #1258 issue, a _shutdownStatsbeat function should not be called if it is undefined.
The constructor parameter is optional, however, the according class property is not.
There is a nullability check in one of the methods, but not in the res.on("end", ... handler. This causes errors when the callback is not provided.
I've made the class property type nullable as well for convenience, but unfortunately, TS strict mode is turned off in this project. As a result, that kind of nullability issues are not caught by TS.
This PR fixes #1258 issue, a
_shutdownStatsbeat
function should not be called if it is undefined.The constructor parameter is optional, however, the according class property is not. There is a nullability check in one of the methods, but not in the
res.on("end", ...
handler. This causes errors when the callback is not provided.I've made the class property type nullable as well for convenience, but unfortunately, TS strict mode is turned off in this project. As a result, that kind of nullability issues are not caught by TS.