File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
test/fixtures/performanceEntry Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { WINDOW } from '@sentry/browser';
22import { browserPerformanceTimeOrigin } from '@sentry/utils' ;
33import { record } from 'rrweb' ;
44
5- import { AllPerformanceEntry } from './types' ;
5+ import { AllPerformanceEntry , PerformancePaintTiming } from './types' ;
66import { isIngestHost } from './util/isIngestHost' ;
77
88export interface ReplayPerformanceEntry {
Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ export interface WorkerRequest {
3535
3636declare global {
3737 const __SENTRY_REPLAY_VERSION__ : string ;
38-
39- // PerformancePaintTiming is only available since TS 4.4, so for now we just define this here
40- // see: https://github.com/microsoft/TypeScript/blob/main/lib/lib.dom.d.ts#L10564
41- type PerformancePaintTiming = PerformanceEntry ;
4238 // @ts -ignore declare again, this _should_ be there but somehow is not available in worker context
4339 type PerformanceNavigationTiming = PerformanceEntry ;
4440}
4541
42+ // PerformancePaintTiming is only available with TS 4.4 and newer
43+ // Therefore, we're exporting it here to make it available in older versions
44+ export type PerformancePaintTiming = PerformanceEntry ;
45+
4646/**
4747 * The response from the worker
4848 */
Original file line number Diff line number Diff line change 1+ import type { PerformancePaintTiming } from '../types' ;
2+
13const NAVIGATION_ENTRY_KEYS : Array < keyof PerformanceNavigationTiming > = [
24 'name' ,
35 'type' ,
Original file line number Diff line number Diff line change 1+ import { PerformancePaintTiming } from '../../../src/types' ;
2+
13export function PerformanceEntryLcp ( obj ?: Partial < PerformancePaintTiming > ) : PerformancePaintTiming {
24 const entry = {
35 name : '' ,
You can’t perform that action at this time.
0 commit comments