Commit 761455d
committed
[monitor-opentelemetry] fix type checking build error
The latest @types/node changes add `string[]` to the `RequestOptions.headers` type:
DefinitelyTyped/DefinitelyTyped#72617
nodejs/node#58049
This PR adds a check and narrow the the type to `http.OutgoingHttpHeaders` before accessing user-agent
property. We don't ever set the user agent header using the `string[]` form so this should be fine.1 parent 83b93ec commit 761455d
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments