Skip to content

Commit

Permalink
fix(mongodb): remove broken type export V4Connection
Browse files Browse the repository at this point in the history
The type `V4Connection` re-introduced in open-telemetry#1170 is missing any type
definitions or imports for `Document`, breaking the build with
Typescript strict mode.
`V4Connection` in `types.ts` is not referenced anywhere (the type
definition in `internal-types.ts` is used. So lets just drop this type
definition.

BREAKING CHANGE: removes the broken exported type `V4Connection`.
Fixes open-telemetry#1639

Signed-off-by: Simon Berz <simon@berz.me>
  • Loading branch information
sberz committed Aug 18, 2023
1 parent d83b57b commit d2d05c6
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions plugins/node/opentelemetry-instrumentation-mongodb/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,3 @@ export enum MongodbCommandType {
COUNT = 'count',
UNKNOWN = 'unknown',
}

// https://github.com/mongodb/node-mongodb-native/blob/v4.2.2/src/cmap/connection.ts
export type V4Connection = {
id: number | '<monitor>';
command(
ns: any,
cmd: Document,
options: undefined | unknown,
callback: any
): void;
};

0 comments on commit d2d05c6

Please sign in to comment.