Commit 400144c
authored
[monitor-opentelemetry] fix type checking build error (#34297)
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 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 400144c
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | | - | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments