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); } 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. * 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' &&