Skip to content

Commit

Permalink
refactor(sdk-trace-node): fix eslint warning (#5387)
Browse files Browse the repository at this point in the history
  • Loading branch information
chancancode authored Jan 29, 2025
1 parent 23adb2b commit 2759d73
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-ho
import { CompositePropagator } from '@opentelemetry/core';
import { NodeTracerProvider } from '../src';

const assertInstanceOf = (actual: object, ExpectedInstance: Function) => {
// Here we are looking for a `AnyConstructor` type, and `Function` is a close
// enough approximation that exists in the standard library.
// eslint-disable-next-line @typescript-eslint/ban-types
const assertInstanceOf = (actual: object, ExpectedConstructor: Function) => {
assert.ok(
actual instanceof ExpectedInstance,
`Expected ${inspect(actual)} to be instance of ${ExpectedInstance.name}`
actual instanceof ExpectedConstructor,
`Expected ${inspect(actual)} to be instance of ${ExpectedConstructor.name}`
);
};

Expand Down

0 comments on commit 2759d73

Please sign in to comment.