Tinkoff / micro-sentry

Tiny Sentry client with idiomatic wrapper for Angular
Apache License 2.0
118 stars 8 forks source link

[FEATURE] Export `Severity` as a regular enum or a string literal union #32

Closed clarkdave closed 2 years ago

clarkdave commented 2 years ago

🚀 Feature request

Currently Severity is exported as a const enum.

It's increasingly common to build TypeScript projects using Babel, esbuild or swc, which do not support const enum. This makes it awkward to call methods like addBreadcrumb, because they expect a Severity, but that cannot be imported so some type asserting must happen instead, e.g. level: 'warning' as any

Alternatively, removing the enum entirely in favour of a string literal union would also work - this is also the approach the official Sentry SDK is using as of v7.

tinkoff-bot commented 2 years ago

:tada: This issue is included in version core@6.0.1 :tada:

The release is available on GitHub release

tinkoff-bot commented 2 years ago

:tada: This issue is included in version browser@6.0.1 :tada:

The release is available on GitHub release

tinkoff-bot commented 2 years ago

:tada: This issue is included in version angular@6.1.4 :tada:

The release is available on GitHub release