Skip to content

Commit

Permalink
chore(react): Remove private namespace JSX (#12691)
Browse files Browse the repository at this point in the history
  • Loading branch information
quisido authored Jul 2, 2024
1 parent a6e2f77 commit 58af1d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit 58af1d7

Please sign in to comment.