Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(instrumentation-grpc): fix eslint warnings
``` /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-grpc/src/clientUtils.ts 105:42 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-grpc/src/instrumentation.ts 129:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 134:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 139:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 144:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-grpc/src/serverUtils.ts 112:23 warning Don't use `Function` as a type @typescript-eslint/ban-types 152:23 warning Don't use `Function` as a type @typescript-eslint/ban-types 207:31 warning Don't use `Function` as a type @typescript-eslint/ban-types 211:31 warning Don't use `Function` as a type @typescript-eslint/ban-types /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-grpc/test/helper.ts 83:11 warning Don't use `Function` as a type @typescript-eslint/ban-types ``` This commit does not involve any changes to runtime code and can be safely merged without any concerns about changing behavior. The first can be replaced with the more precise type that we are expecting. The second just wansn't needed anymore. The third is highly unusual. After spending significant amount of time reading and stepping through the code – I am quite confident that the `.call({}, ...)` (and `.apply({}, ...)` elsewhere in the tests) are a mistake that we inherited from very old code. However I don't feel confident enough that I can *explain* what is going on here to make a change to the runtime code, so in the meantime, I think the best course of action is to leave it as-is, document the issue and have someone with more expertise untangle this down the road. The last one was a change in test code to use a more precise call signature. Ref #5365
- Loading branch information