Skip to content

Broken types on Console integration levels option #4878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
pkuczynski opened this issue Apr 7, 2022 · 2 comments · Fixed by #4879
Closed
3 tasks done

Broken types on Console integration levels option #4878

pkuczynski opened this issue Apr 7, 2022 · 2 comments · Fixed by #4879
Assignees

Comments

@pkuczynski
Copy link
Contributor

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/react

SDK Version

6.19.5

Framework Version

6.19.5

Link to Sentry event

No response

Steps to Reproduce

My init looks like this:

Sentry.init({
    dsn: '...',
    ...
    integrations: [
        new CaptureConsole({ levels: ['error'] }),
    ]
})

Expected Result

It works

Actual Result

TypeScript error is raised:

TS2322: Type '"error"' is not assignable to type '"debug"'.

I believe this was caused by #4863

@lforst
Copy link
Contributor

lforst commented Apr 7, 2022

Thanks for writing in! This is unintended and we will look into it asap.

In the meanwhile you can pin the SDK to version 6.19.4 which should not have this issue.

@pkuczynski
Copy link
Contributor Author

In the meanwhile you can pin the SDK to version 6.19.4 which should not have this issue.

Or change to new CaptureConsole({ levels: ['error', 'warn'] as any }), :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants