File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
experimental/packages/opentelemetry-instrumentation-fetch/src
opentelemetry-context-zone-peer-dep/src
opentelemetry-sdk-trace-web/src Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ export class FetchInstrumentation extends InstrumentationBase<
301301 ) : Promise < Response > {
302302 const self = this ;
303303 const url = web . parseUrl (
304- args [ 0 ] instanceof Request ? args [ 0 ] . url : args [ 0 ]
304+ args [ 0 ] instanceof Request ? args [ 0 ] . url : String ( args [ 0 ] )
305305 ) . href ;
306306
307307 const options = args [ 0 ] instanceof Request ? args [ 0 ] : args [ 1 ] || { } ;
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- import { TargetWithEvents } from './types' ;
18-
1917/**
20- * check if an object has addEventListener and removeEventListener functions then it will return true
21- * @param obj
18+ * check if an object has addEventListener and removeEventListener functions then it will return true.
19+ * Generally only called with a `TargetWithEvents` but may be called with an unknown / any.
20+ * @param obj - The object to check.
2221 */
23- export function isListenerObject ( obj : TargetWithEvents = { } ) : boolean {
22+ export function isListenerObject ( obj : any = { } ) : boolean {
2423 return (
2524 typeof obj . addEventListener === 'function' &&
2625 typeof obj . removeEventListener === 'function'
Original file line number Diff line number Diff line change @@ -44,7 +44,10 @@ function getUrlNormalizingAnchor(): HTMLAnchorElement {
4444 * @param key
4545 */
4646// eslint-disable-next-line @typescript-eslint/no-explicit-any
47- export function hasKey < O > ( obj : O , key : keyof any ) : key is keyof O {
47+ export function hasKey < O extends object > (
48+ obj : O ,
49+ key : keyof any
50+ ) : key is keyof O {
4851 return key in obj ;
4952}
5053
You can’t perform that action at this time.
0 commit comments