Skip to content

Commit 32ab48a

Browse files
committed
typecheck
1 parent 6957401 commit 32ab48a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/rum-core/src/browser/performanceObservable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export interface RumNotRestoredReasons {
8686
reasons: RumNotRestoredReasonDetails[] | null
8787
src: string | null
8888
url: string | null
89-
toJSON(): Omit<RumNotRestoredReasons, 'toJSON'>
89+
toJSON?(): RumNotRestoredReasons
9090
}
9191

9292
export interface RumPerformanceNavigationTiming extends Omit<RumPerformanceResourceTiming, 'entryType'> {

packages/rum-core/src/domain/view/viewCollection.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { discardNegativeDuration } from '../discardNegativeDuration'
44
import type { RecorderApi } from '../../boot/rumPublicApi'
55
import type { RawRumViewEvent, ViewPerformanceData } from '../../rawRumEvent.types'
66
import { RumEventType } from '../../rawRumEvent.types'
7-
import type { RumNotRestoredReasons } from '../../browser/performanceObservable'
87
import type { LifeCycle, RawRumEventCollectedData } from '../lifeCycle'
98
import { LifeCycleEventType } from '../lifeCycle'
109
import type { LocationChange } from '../../browser/locationChangeObservable'
@@ -130,8 +129,7 @@ function processViewUpdate(
130129
count: view.eventCounts.longTaskCount,
131130
},
132131
performance: computeViewPerformanceData(view.commonViewMetrics, view.initialViewMetrics),
133-
not_restored_reasons:
134-
view.initialViewMetrics.navigationTimings?.notRestoredReasons?.toJSON() as RumNotRestoredReasons,
132+
not_restored_reasons: view.initialViewMetrics.navigationTimings?.notRestoredReasons?.toJSON?.(),
135133
resource: {
136134
count: view.eventCounts.resourceCount,
137135
},

0 commit comments

Comments
 (0)