-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
Version:
6.4.0
Description
Creating a custom Route component using Sentry as described on the documentation:
import {
Route as BaseRoute
} from 'react-router-dom';
import {
withSentryRouting,
} from '@sentry/react';
export const Route = withSentryRouting(BaseRoute);
export default null;Give me the following Typescript error:
Argument of type 'typeof Route' is not assignable to parameter of type 'ComponentType<RouteProps & Record<string, any>>'.
Type 'typeof Route' is not assignable to type 'ComponentClass<RouteProps & Record<string, any>, any>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'RouteProps & Record<string, any>' is not assignable to type '(RouteProps<any, { [x: string]: string | undefined; }> & OmitNative<any, keyof RouteProps<string, { [x: string]: string | undefined; }>>) | Readonly<RouteProps<any, { ...; }> & OmitNative<...>>'.
Type 'RouteProps & Record<string, any>' is not assignable to type 'Readonly<RouteProps<any, { [x: string]: string | undefined; }> & OmitNative<any, keyof RouteProps<string, { [x: string]: string | undefined; }>>>'.
Types of property 'location' are incompatible.
Type 'Location | undefined' is not assignable to type 'Location<unknown> | undefined'.
Type 'Location' is not assignable to type 'Location<unknown> | undefined'.
Type 'Location' is missing the following properties from type 'Location<unknown>': search, state, hashts(2345)
6 | } from '@sentry/react';
7 |
> 8 | export const Route = withSentryRouting(BaseRoute);
| ^
9 |
10 | export default null;
11 |
alippai
Metadata
Metadata
Assignees
Labels
No labels