Skip to content

Commit 25005e2

Browse files
committed
TypeScript emits InstrumentationNodeModuleDefinition with " | undefined" for some reason, making it incompatible with InstrumentationModuleDefinition under exactOptionalPropertyTypes.
1 parent 54b14fb commit 25005e2

File tree

1 file changed

+6
-2
lines changed
  • experimental/packages/opentelemetry-instrumentation/src

1 file changed

+6
-2
lines changed

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

+6-2
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)