From 53585061c0c41fd05f62519ecd908c51131def61 Mon Sep 17 00:00:00 2001 From: Kiran Dhamodharan Date: Wed, 8 Nov 2023 15:46:40 -0600 Subject: [PATCH 1/3] Lint fixes --- api/src/diag/ComponentLogger.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/src/diag/ComponentLogger.ts b/api/src/diag/ComponentLogger.ts index 2253501863..e8dba551fd 100644 --- a/api/src/diag/ComponentLogger.ts +++ b/api/src/diag/ComponentLogger.ts @@ -33,23 +33,23 @@ export class DiagComponentLogger implements DiagLogger { this._namespace = props.namespace || 'DiagComponentLogger'; } - public debug(...args: any[]): void { + public debug(...args: Parameters): void { return logProxy('debug', this._namespace, args); } - public error(...args: any[]): void { + public error(...args: Parameters): void { return logProxy('error', this._namespace, args); } - public info(...args: any[]): void { + public info(...args: Parameters): void { return logProxy('info', this._namespace, args); } - public warn(...args: any[]): void { + public warn(...args: Parameters): void { return logProxy('warn', this._namespace, args); } - public verbose(...args: any[]): void { + public verbose(...args: Parameters): void { return logProxy('verbose', this._namespace, args); } } @@ -57,7 +57,7 @@ export class DiagComponentLogger implements DiagLogger { function logProxy( funcName: keyof DiagLogger, namespace: string, - args: any + args: Parameters ): void { const logger = getGlobal('diag'); // shortcut if logger not set @@ -66,5 +66,5 @@ function logProxy( } args.unshift(namespace); - return logger[funcName](...(args as Parameters)); + return logger[funcName](...args); } From 23690f9fc93a75bf6b9305b885df10c4259e3761 Mon Sep 17 00:00:00 2001 From: Kiran Dhamodharan Date: Wed, 8 Nov 2023 15:47:30 -0600 Subject: [PATCH 2/3] Lint fix --- api/src/propagation/TextMapPropagator.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/propagation/TextMapPropagator.ts b/api/src/propagation/TextMapPropagator.ts index 7cb41432cb..6050f37141 100644 --- a/api/src/propagation/TextMapPropagator.ts +++ b/api/src/propagation/TextMapPropagator.ts @@ -27,7 +27,7 @@ import { Context } from '../context/types'; * usually implemented via library-specific request interceptors, where the * client-side injects values and the server-side extracts them. */ -export interface TextMapPropagator { +export interface TextMapPropagator { /** * Injects values from a given `Context` into a carrier. * @@ -75,7 +75,7 @@ export interface TextMapPropagator { * A setter is specified by the caller to define a specific method * to set key/value pairs on the carrier within a propagator. */ -export interface TextMapSetter { +export interface TextMapSetter { /** * Callback used to set a key/value pair on an object. * @@ -93,7 +93,7 @@ export interface TextMapSetter { * A getter is specified by the caller to define a specific method * to get the value of a key from a carrier. */ -export interface TextMapGetter { +export interface TextMapGetter { /** * Get a list of all keys available on the carrier. * From 0e7fc0f9734c96373c474428508a1c0b095657fd Mon Sep 17 00:00:00 2001 From: Kiran Dhamodharan Date: Wed, 8 Nov 2023 15:48:15 -0600 Subject: [PATCH 3/3] Lint fix --- api/src/trace/NoopTracer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/trace/NoopTracer.ts b/api/src/trace/NoopTracer.ts index 0656429b86..9ec0d11c34 100644 --- a/api/src/trace/NoopTracer.ts +++ b/api/src/trace/NoopTracer.ts @@ -99,7 +99,7 @@ export class NoopTracer implements Tracer { } } -function isSpanContext(spanContext: any): spanContext is SpanContext { +function isSpanContext(spanContext: SpanContext): spanContext is SpanContext { return ( typeof spanContext === 'object' && typeof spanContext['spanId'] === 'string' &&