-
Notifications
You must be signed in to change notification settings - Fork 397
Open
Description
First, thx for your great work.
The last 3 hours i was looking for a problem. My pushgateway instance seems to have no connection to the registry.
Since the TS Compiler does not show an error, i've not checked to code ...
let push = new Pushgateway('http://127.0.0.1:9091', reg);This code is TS correct, but wrong.
Reason:
The Typedefintion
Line 700 in c1d76c5
| constructor(url: string, options?: any, registry?: Registry<T>); |
options is typed as any and registry as optional.
So it is correct to forget the option parameter, so the registry parameter ist used as "option"
Which does not make any sence. I created a Pushgateways without a connected registry ...
Solution:
If i look into the source code the type is Url from packege "url" extended with a single property requireJobName: true, ?
So a better type for option is {requireJobName: boolean}.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels