I wanted to start a timer on a specific label and am doing something like this in my code:
const end = histogram.labels({ mylabels }).startTimer();
// some stuff
const seconds = end();
But I was surprised to see that this startTimer in the ts definitions doesn't return number and supposedly returns void. In testing, my code works and it still returns a number so I believe it's just a problem with the ts definition.
Hi,
I was wondering if the following line should return number instead of void.
https://github.com/siimon/prom-client/blob/a88a5c3ce4e928ff05d91e64e74376495bfe0570/index.d.ts#L566
I wanted to start a timer on a specific label and am doing something like this in my code:
But I was surprised to see that this startTimer in the ts definitions doesn't return number and supposedly returns void. In testing, my code works and it still returns a number so I believe it's just a problem with the ts definition.