Skip to content

Commit

Permalink
chore(api-metrics): fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alisabzevari committed Aug 3, 2021
1 parent 3b9cd16 commit 7e00ab7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/opentelemetry-api-metrics/src/NoopMeter.ts
Expand Up @@ -159,23 +159,23 @@ export class NoopMetric<T> implements UnboundMetric<T> {
export class NoopCounterMetric
extends NoopMetric<BoundCounter>
implements Counter {
add(value: number, labels: Labels) {
add(value: number, labels: Labels): void {
this.bind(labels).add(value);
}
}

export class NoopValueRecorderMetric
extends NoopMetric<BoundValueRecorder>
implements ValueRecorder {
record(value: number, labels: Labels) {
record(value: number, labels: Labels): void {
this.bind(labels).record(value);
}
}

export class NoopBaseObserverMetric
extends NoopMetric<BoundBaseObserver>
implements BaseObserver {
observation() {
observation(): { observer: BaseObserver; value: number; } {
return {
observer: this as BaseObserver,
value: 0,
Expand All @@ -198,7 +198,7 @@ export class NoopBoundValueRecorder implements BoundValueRecorder {
}

export class NoopBoundBaseObserver implements BoundBaseObserver {
update(_value: number) {}
update(_value: number): void {}
}

export const NOOP_METER = new NoopMeter();
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-api-metrics/src/api/metrics.ts
Expand Up @@ -78,7 +78,7 @@ export class MetricsAPI {
}

/** Remove the global meter provider */
public disable() {
public disable(): void {
delete _global[GLOBAL_METRICS_API_KEY];
}
}

0 comments on commit 7e00ab7

Please sign in to comment.