File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1- import { ClientReport , ClientReportEnvelope } from '@sentry/types' ;
1+ import { ClientReport , ClientReportEnvelope , ClientReportEnvelopeItem } from '@sentry/types' ;
22
33import { createEnvelope } from './envelope' ;
44import { dateTimestampInSeconds } from './time' ;
@@ -13,13 +13,13 @@ export function createClientReportEnvelope(
1313 dsn ?: string ,
1414 timestamp ?: number ,
1515) : ClientReportEnvelope {
16- const header = dsn ? { dsn } : { } ;
17-
18- const itemHeader = { type : 'client_report' } ;
19- const itemPayload = {
20- timestamp : timestamp || dateTimestampInSeconds ( ) ,
21- discarded_events,
22- } ;
23-
24- return createEnvelope < ClientReportEnvelope > ( header , [ [ itemHeader , itemPayload ] ] ) ;
16+ return createEnvelope < ClientReportEnvelope > ( dsn ? { dsn } : { } , [
17+ [
18+ { type : 'client_report' } ,
19+ {
20+ timestamp : timestamp || dateTimestampInSeconds ( ) ,
21+ discarded_events,
22+ } ,
23+ ] ,
24+ ] ) ;
2525}
Original file line number Diff line number Diff line change @@ -22,4 +22,4 @@ export * from './syncpromise';
2222export * from './time' ;
2323export * from './env' ;
2424export * from './envelope' ;
25- export * from './clientreports ' ;
25+ export * from './clientreport ' ;
You can’t perform that action at this time.
0 commit comments