Skip to content

Commit 6639677

Browse files
committed
update export + inline
1 parent f72e211 commit 6639677

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

packages/utils/src/clientreport.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ClientReport, ClientReportEnvelope } from '@sentry/types';
1+
import { ClientReport, ClientReportEnvelope, ClientReportEnvelopeItem } from '@sentry/types';
22

33
import { createEnvelope } from './envelope';
44
import { 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
}

packages/utils/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ export * from './syncpromise';
2222
export * from './time';
2323
export * from './env';
2424
export * from './envelope';
25-
export * from './clientreports';
25+
export * from './clientreport';

0 commit comments

Comments
 (0)