You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both interface from react-native and react have the same typing
Actual Result
Both interface from react-native and react have now different typing since v7
/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/src/libs/monitoring/services.ts
TypeScript error in /home/dka/workspace/github.com/pass-culture/pass-culture-app-native/src/libs/monitoring/services.ts(20,3):
Type '(exception: any, captureContext?: CaptureContext | undefined) => string' is not assignable to type '(exception: unknown, captureContext?: Record<string, unknown> | CaptureContext | undefined) => void'.
Types of parameters 'captureContext' and 'captureContext' are incompatible.
Type 'Record<string, unknown> | CaptureContext | undefined' is not assignable to type 'CaptureContext | undefined'.
Type 'Scope' is not assignable to type 'CaptureContext | undefined'.
Type 'import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/types/types/scope").Scope' is not assignable to type 'import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/react-native/node_modules/@sentry/types/dist/scope").Scope'.
Types of property 'addEventProcessor' are incompatible.
Type '(callback: import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/types/types/eventprocessor").EventProcessor) => import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/types/types/scope").Scope' is not assignable to type '(callback: import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/react-native/node_modules/@sentry/types/dist/eventprocessor").EventProcessor) => import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/react-native/node_modules/@sent...'.
Types of parameters 'callback' and 'callback' are incompatible.
Type 'import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/react-native/node_modules/@sentry/types/dist/eventprocessor").EventProcessor' is not assignable to type 'import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/types/types/eventprocessor").EventProcessor'.
Types of parameters 'event' and 'event' are incompatible.
Type 'import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/types/types/event").Event' is not assignable to type 'import("/home/dka/workspace/github.com/pass-culture/pass-culture-app-native/node_modules/@sentry/react-native/node_modules/@sentry/types/dist/event").Event'.
Types of property 'level' are incompatible.
Type 'SeverityLevel | Severity | undefined' is not assignable to type 'Severity | undefined'.
Type '"log"' is not assignable to type 'Severity | undefined'. TS2322
18 |
19 | export const eventMonitoring: EventMonitoring = {
> 20 | captureException: SentryModule.captureException,
| ^
21 | captureMessage: SentryModule.captureMessage,
22 | captureEvent: SentryModule.captureEvent,
23 | configureScope: SentryModule.configureScope,
Why did the react-native package did not get the same types upgrades ?
The text was updated successfully, but these errors were encountered:
Hey, thanks for writing in! Currently @sentry/react-native does not support the v7 SDK. Work is being done in getsentry/sentry-react-native#2250 to add support.
I have a typing problem and we only use a few methods from those sentry packages :
SentryModule.captureException
SentryModule.captureEvent
SentryModule.captureMessage
SentryModule.configureScope
SentryModule.setUser
SentryModule.init
So I hoped it would be oK.
Ignoring those types and it still seemed to be ok at least on Android.
Not sure if this resolve my initial bug I am working on (request 400 on sentry ping), I will have to open a new issue, you can view the bug here network tab.
This is the reason why I was trying to upgrade sentry sdk:
Is there an existing issue for this?
How do you use Sentry?
Self-hosted/on-premise
Which package are you using?
@sentry/react
SDK Version
latest
Framework Version
3.4.3
Link to Sentry event
No response
Steps to Reproduce
libs.ts
libs.ts
>export * from '@sentry/react-native'
using v3.4.3libs.web.ts
>export * from '@sentry/react'
using v7.0.0client.ts
Expected Result
Both interface from react-native and react have the same typing
Actual Result
Both interface from react-native and react have now different typing since v7
Why did the react-native package did not get the same types upgrades ?
The text was updated successfully, but these errors were encountered: