Skip to content

Commit 6138634

Browse files
committed
Remove TODOs
1 parent e106c9a commit 6138634

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/esbuild-plugin-node/src/config/main.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentation
2626
function getModuleDefinitions(
2727
instrumentation: Instrumentation
2828
): InstrumentationModuleDefinition[] {
29-
if (
30-
// 'getModuleDefinitions' in instrumentation &&
31-
// typeof instrumentation.getModuleDefinitions === 'function'
32-
instrumentation instanceof InstrumentationBase
33-
) {
29+
if (instrumentation instanceof InstrumentationBase) {
3430
return instrumentation.getModuleDefinitions() ?? [];
3531
}
3632

@@ -71,7 +67,6 @@ export function getOtelPackageToInstrumentationConfig() {
7167
{
7268
oTelInstrumentationPackage:
7369
instrumentation.instrumentationName as keyof EsbuildInstrumentationConfigMap,
74-
// TODO: Do we need to worry about minification/obfuscation messing with this class name?
7570
oTelInstrumentationClass: instrumentation.constructor.name,
7671
configGenerator,
7772
};

packages/esbuild-plugin-node/src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export interface ModuleParams {
4242
}
4343

4444
type _RemoveFunctions<T> = {
45-
// TODO: Mabye:
46-
// [P in keyof T as T[P] extends (...args: unknown[]) => unknown ? never : P]: T[P];
47-
[P in keyof T as T[P] extends (...args: any) => any ? never : P]: T[P];
45+
[P in keyof T as T[P] extends (...args: unknown[]) => unknown
46+
? never
47+
: P]: T[P];
4848
};
4949

5050
// _RemoveFunctions does not work on optional fields, so first make the type required then apply Partial to the result

0 commit comments

Comments
 (0)