Set the exactOptionalPropertyTypes tsconfig option
googol opened this issue · 6 comments
Since typescript 4.4 this new tsconfig option has been available, to clarify the difference between { foo: string | undefined }
and { foo?: string }
. This would be a beneficial option for me to enable in my project, but I cannot as the opentelemetry typings don't typecheck correctly with option.
Affected files that I'm seeing:
Errors Files
1 node_modules/@azure/opentelemetry-instrumentation-azure-sdk/node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentationNodeModuleDefinition.d.ts:2
1 node_modules/@opentelemetry/instrumentation-dns/build/src/instrumentation.d.ts:10
1 node_modules/@opentelemetry/instrumentation-express/build/src/instrumentation.d.ts:9
1 node_modules/@opentelemetry/instrumentation-http/build/src/http.d.ts:22
1 node_modules/@opentelemetry/instrumentation-net/build/src/instrumentation.d.ts:5
1 node_modules/@opentelemetry/instrumentation-pg/build/src/instrumentation.d.ts:9
1 node_modules/@opentelemetry/instrumentation-winston/build/src/instrumentation.d.ts:5
1 node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentationNodeModuleDefinition.d.ts:2
Link to documentation: https://www.typescriptlang.org/tsconfig#exactOptionalPropertyTypes
- This only affects the JavaScript OpenTelemetry library
- This may affect other libraries, but I would like to get opinions here first
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
please consider this change
Seeing this same issue in my projects
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Bumping to keep this alive. This is still desired
We talked about this in the SIG meeting and we are generally in favor of this, assuming it doesn't cause issues. I'm going to mark this as up for grabs and PRs will be welcome.