You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the following eslint warnings:
```
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/src/http.ts
508:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
931:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
1032:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
1043:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
```
Because the expression we check is indirected through the a method
call (`getConfig()`), TypeScript cannot assume the value would be
the same across the two calls. By extracting the value and checking
for that, TypeScript can narrow the type correctly and we can avoid
the non-null assertion.
Ref open-telemetry#5365
0 commit comments