Skip to content

Commit 284ff9d

Browse files
alecmevZirak
authored andcommitted
fix(instrumentation): Fix optional property types (open-telemetry#4833)
1 parent 341ce77 commit 284ff9d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/
2121

2222
* fix(sdk-node): avoid spurious diag errors for unknown OTEL_NODE_RESOURCE_DETECTORS values [#4879](https://github.com/open-telemetry/opentelemetry-js/pull/4879) @trentm
2323
* deps(opentelemetry-instrumentation): Bump `shimmer` types to 1.2.0 [#4865](https://github.com/open-telemetry/opentelemetry-js/pull/4865) @lforst
24+
* fix(instrumentation): Fix optional property types [#4833](https://github.com/open-telemetry/opentelemetry-js/pull/4833) @alecmev
2425

2526
### :books: (Refine Doc)
2627

experimental/packages/opentelemetry-instrumentation/src/types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,15 @@ export interface InstrumentationModuleDefinition {
136136

137137
/** Method to patch the instrumentation */
138138
// eslint-disable-next-line @typescript-eslint/no-explicit-any
139-
patch?: (moduleExports: any, moduleVersion?: string) => any;
139+
patch?:
140+
| ((moduleExports: any, moduleVersion?: string | undefined) => any)
141+
| undefined;
140142

141143
/** Method to unpatch the instrumentation */
142144
// eslint-disable-next-line @typescript-eslint/no-explicit-any
143-
unpatch?: (moduleExports: any, moduleVersion?: string) => void;
145+
unpatch?:
146+
| ((moduleExports: any, moduleVersion?: string | undefined) => void)
147+
| undefined;
144148
}
145149

146150
/**

0 commit comments

Comments
 (0)