Skip to content

Commit

Permalink
Fix #4712
Browse files Browse the repository at this point in the history
TypeScript emits InstrumentationNodeModuleDefinition with " | undefined"
for some reason, making it incompatible with
InstrumentationModuleDefinition under exactOptionalPropertyTypes.
  • Loading branch information
alecmev committed Jul 5, 2024
1 parent 0f6363a commit 5f62c5b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 5f62c5b

Please sign in to comment.