diff --git a/experimental/packages/opentelemetry-instrumentation/src/types.ts b/experimental/packages/opentelemetry-instrumentation/src/types.ts index 2fa567ff012..b58054ac0df 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/types.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/types.ts @@ -136,11 +136,15 @@ export interface InstrumentationModuleDefinition { /** Method to patch the instrumentation */ // eslint-disable-next-line @typescript-eslint/no-explicit-any - patch?: (moduleExports: any, moduleVersion?: string) => any; + patch?: + | ((moduleExports: any, moduleVersion?: string | undefined) => any) + | undefined; /** Method to unpatch the instrumentation */ // eslint-disable-next-line @typescript-eslint/no-explicit-any - unpatch?: (moduleExports: any, moduleVersion?: string) => void; + unpatch?: + | ((moduleExports: any, moduleVersion?: string | undefined) => void) + | undefined; } /**