Skip to content
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

Remove private namespace JSX #12691

Merged
merged 3 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/react/src/reactrouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import type { Client, Integration, Span, TransactionSource } from '@sentry/types';
import hoistNonReactStatics from 'hoist-non-react-statics';
import * as React from 'react';
import type { ReactElement } from 'react';

import type { Action, Location } from './types';

Expand All @@ -32,7 +33,7 @@ export type RouteConfig = {
[propName: string]: unknown;
path?: string | string[];
exact?: boolean;
component?: JSX.Element;
component?: ReactElement;
routes?: RouteConfig[];
};

Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Disabling `no-explicit-any` for the whole file as `any` has became common requirement.
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { ReactElement } from 'react';

export type Action = 'PUSH' | 'REPLACE' | 'POP';

Expand Down Expand Up @@ -67,7 +68,7 @@ export type UseNavigationType = () => Action;
// react-router > 6.0.0 and >= 6.4.2.
export type RouteObjectArrayAlias = any;
export type RouteMatchAlias = any;
export type CreateRoutesFromChildren = (children: JSX.Element[]) => RouteObjectArrayAlias;
export type CreateRoutesFromChildren = (children: ReactElement[]) => RouteObjectArrayAlias;
export type MatchRoutes = (
routes: RouteObjectArrayAlias,
location: Location,
Expand Down
Loading