diff --git a/packages/replay-internal/src/types/replayFrame.ts b/packages/replay-internal/src/types/replayFrame.ts index d2070d193f16..07e6392d1fd0 100644 --- a/packages/replay-internal/src/types/replayFrame.ts +++ b/packages/replay-internal/src/types/replayFrame.ts @@ -173,7 +173,12 @@ interface ReplayHistoryFrame extends ReplayBaseSpanFrame { interface ReplayWebVitalFrame extends ReplayBaseSpanFrame { data: WebVitalData; - op: 'largest-contentful-paint' | 'cumulative-layout-shift' | 'first-input-delay' | 'interaction-to-next-paint' | 'time-to-first-byte'; + op: + | 'largest-contentful-paint' + | 'cumulative-layout-shift' + | 'first-input-delay' + | 'interaction-to-next-paint' + | 'time-to-first-byte'; } interface ReplayMemoryFrame extends ReplayBaseSpanFrame { diff --git a/packages/replay-internal/src/util/createPerformanceEntries.ts b/packages/replay-internal/src/util/createPerformanceEntries.ts index 695b4fc4e618..be30459ad867 100644 --- a/packages/replay-internal/src/util/createPerformanceEntries.ts +++ b/packages/replay-internal/src/util/createPerformanceEntries.ts @@ -191,12 +191,14 @@ export function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntr * Add a CLS event to the replay based on a CLS metric. */ export function getCumulativeLayoutShift(metric: Metric): ReplayPerformanceEntry { - const lastEntry = metric.entries[metric.entries.length - 1] as (PerformanceEntry & { sources?: LayoutShiftAttribution[] }) | undefined; + const lastEntry = metric.entries[metric.entries.length - 1] as + | (PerformanceEntry & { sources?: LayoutShiftAttribution[] }) + | undefined; const nodes: Node[] = []; if (lastEntry && lastEntry.sources) { for (const source of lastEntry.sources) { if (source.node) { - nodes.push(source.node) + nodes.push(source.node); } } @@ -251,7 +253,7 @@ export function getWebVital( } } else { if (node) { - nodeIds.push(record.mirror.getId(node)) + nodeIds.push(record.mirror.getId(node)); } }