File tree Expand file tree Collapse file tree
packages/replay-internal/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,7 +173,12 @@ interface ReplayHistoryFrame extends ReplayBaseSpanFrame {
173173
174174interface ReplayWebVitalFrame extends ReplayBaseSpanFrame {
175175 data : WebVitalData ;
176- op : 'largest-contentful-paint' | 'cumulative-layout-shift' | 'first-input-delay' | 'interaction-to-next-paint' | 'time-to-first-byte' ;
176+ op :
177+ | 'largest-contentful-paint'
178+ | 'cumulative-layout-shift'
179+ | 'first-input-delay'
180+ | 'interaction-to-next-paint'
181+ | 'time-to-first-byte' ;
177182}
178183
179184interface ReplayMemoryFrame extends ReplayBaseSpanFrame {
Original file line number Diff line number Diff line change @@ -191,12 +191,14 @@ export function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntr
191191 * Add a CLS event to the replay based on a CLS metric.
192192 */
193193export function getCumulativeLayoutShift ( metric : Metric ) : ReplayPerformanceEntry < WebVitalData > {
194- const lastEntry = metric . entries [ metric . entries . length - 1 ] as ( PerformanceEntry & { sources ?: LayoutShiftAttribution [ ] } ) | undefined ;
194+ const lastEntry = metric . entries [ metric . entries . length - 1 ] as
195+ | ( PerformanceEntry & { sources ?: LayoutShiftAttribution [ ] } )
196+ | undefined ;
195197 const nodes : Node [ ] = [ ] ;
196198 if ( lastEntry && lastEntry . sources ) {
197199 for ( const source of lastEntry . sources ) {
198200 if ( source . node ) {
199- nodes . push ( source . node )
201+ nodes . push ( source . node ) ;
200202 }
201203
202204 }
@@ -251,7 +253,7 @@ export function getWebVital(
251253 }
252254 } else {
253255 if ( node ) {
254- nodeIds . push ( record . mirror . getId ( node ) )
256+ nodeIds . push ( record . mirror . getId ( node ) ) ;
255257 }
256258 }
257259
You can’t perform that action at this time.
0 commit comments