Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(sdk-trace-web): fix eslint warning #5388

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/opentelemetry-sdk-trace-web/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ function getUrlNormalizingAnchor(): HTMLAnchorElement {
* @param obj
* @param key
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function hasKey<O extends object>(
obj: O,
key: keyof any
key: PropertyKey
): key is keyof O {
return key in obj;
}
Expand All @@ -67,8 +66,8 @@ export function addSpanNetworkEvent(
entries: PerformanceEntries,
refPerfName?: string
): api.Span | undefined {
let perfTime = undefined;
let refTime = undefined;
let perfTime: number | undefined;
let refTime: number | undefined;
if (
hasKey(entries, performanceName) &&
typeof entries[performanceName] === 'number'
Expand Down
Loading