File tree Expand file tree Collapse file tree 4 files changed +24
-16
lines changed Expand file tree Collapse file tree 4 files changed +24
-16
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ const Counter = class Counter extends EventEmitter {
1313 `argument 'options' must be provided` ,
1414 ) ;
1515
16- this . options = {
17- labels : { } ,
18- ...options ,
19- } ;
16+ Object . defineProperty ( this , 'options' , {
17+ value : {
18+ labels : { } ,
19+ ...options ,
20+ } ,
21+ } ) ;
2022 }
2123
2224 inc ( value , options ) {
Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ const Gauge = class Gauge extends EventEmitter {
1313 `argument 'options' must be provided` ,
1414 ) ;
1515
16- this . options = {
17- labels : [ ] ,
18- ...options ,
19- } ;
16+ Object . defineProperty ( this , 'options' , {
17+ value : {
18+ labels : { } ,
19+ ...options ,
20+ } ,
21+ } ) ;
2022 }
2123
2224 set ( value , options = { } ) {
Original file line number Diff line number Diff line change @@ -16,10 +16,12 @@ const Histogram = class Histogram extends EventEmitter {
1616
1717 // TODO: validate optional buckets option
1818
19- this . options = {
20- labels : [ ] ,
21- ...options ,
22- } ;
19+ Object . defineProperty ( this , 'options' , {
20+ value : {
21+ labels : { } ,
22+ ...options ,
23+ } ,
24+ } ) ;
2325 }
2426
2527 observe ( value , options = { } ) {
Original file line number Diff line number Diff line change @@ -16,10 +16,12 @@ const Summary = class Summary extends EventEmitter {
1616
1717 // TODO: validate optional quantiles option
1818
19- this . options = {
20- labels : [ ] ,
21- ...options ,
22- } ;
19+ Object . defineProperty ( this , 'options' , {
20+ value : {
21+ labels : { } ,
22+ ...options ,
23+ } ,
24+ } ) ;
2325 }
2426
2527 observe ( value , options = { } ) {
You can’t perform that action at this time.
0 commit comments