Skip to content

Commit 94f3641

Browse files
committed
streamline types
1 parent cd0a0cd commit 94f3641

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

packages/tracing-internal/src/browser/instrument.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,7 @@ function instrument(type: InstrumentHandlerType): void {
5151
}
5252

5353
export function addPerformanceInstrumentationHandler(
54-
type: 'event',
55-
callback: (data: { entries: PerformanceEventTiming[] }) => void,
56-
): CleanupHandlerCallback;
57-
export function addPerformanceInstrumentationHandler(
58-
type: 'navigation',
59-
callback: (data: { entries: PerformanceNavigationTiming[] }) => void,
60-
): CleanupHandlerCallback;
61-
export function addPerformanceInstrumentationHandler(
62-
type: 'paint',
63-
callback: (data: { entries: PerformancePaintTiming[] }) => void,
64-
): CleanupHandlerCallback;
65-
export function addPerformanceInstrumentationHandler(
66-
type: 'resource',
67-
callback: (data: { entries: PerformanceResourceTiming[] }) => void,
68-
): CleanupHandlerCallback;
69-
export function addPerformanceInstrumentationHandler(
70-
type: 'longtask' | 'element' | InstrumentHandlerTypePerformanceObserver,
54+
type: InstrumentHandlerTypePerformanceObserver,
7155
callback: (data: { entries: PerformanceEntry[] }) => void,
7256
): CleanupHandlerCallback;
7357
export function addPerformanceInstrumentationHandler(

packages/tracing-internal/src/browser/metrics/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function startTrackingInteractions(): void {
9595
const duration = msToSec(entry.duration);
9696

9797
transaction.startChild({
98-
description: htmlTreeAsString(entry.target),
98+
description: htmlTreeAsString((entry as PerformanceEventTiming).target),
9999
op: `ui.interaction.${entry.name}`,
100100
origin: 'auto.ui.browser.metrics',
101101
startTimestamp: startTime,

0 commit comments

Comments
 (0)