Skip to content

Commit 70e6666

Browse files
AbhiPrasadonurtemizkan
authored andcommitted
ref(integrations): Make ReportTypes a const enum (#4209)
`ReportTypes` is an interally used enum, so we do not need the runtime support. The `ReportTypes` enum lives in `packages/integrations/src/reportingobserver.ts` and is used by the `ReportingObserver` integration to manage report types. According to the TS docs: https://www.typescriptlang.org/docs/handbook/enums.html > Const enums can only use constant enum expressions and unlike regular enums they are completely removed during compilation. Const enum members are inlined at use sites. This is possible since const enums cannot have computed members. This helps save on bundle size.
1 parent 3141f08 commit 70e6666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/integrations/src/reportingobserver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Report {
1111
}
1212

1313
/** JSDoc */
14-
enum ReportTypes {
14+
const enum ReportTypes {
1515
/** JSDoc */
1616
Crash = 'crash',
1717
/** JSDoc */

0 commit comments

Comments
 (0)