Skip to content

Commit ee25a51

Browse files
authored
fix(react): Type more react router types as any (#2843)
1 parent f070384 commit ee25a51

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

packages/react/src/errorboundary.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundarySta
124124
}
125125
}
126126

127-
function withErrorBoundary<P extends Record<string, unknown>>(
127+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
128+
function withErrorBoundary<P extends Record<string, any>>(
128129
WrappedComponent: React.ComponentType<P>,
129130
errorBoundaryOptions: ErrorBoundaryProps,
130131
): React.FC<P> {

packages/react/src/reactrouter.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export type RouteConfig = {
2424
};
2525

2626
interface RouteProps {
27+
[propName: string]: any;
2728
location?: Location;
2829
component?: React.ComponentType<any> | React.ComponentType<any>;
2930
render?: (props: any) => React.ReactNode;

packages/react/src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export type Action = 'PUSH' | 'REPLACE' | 'POP';
55
export type Location = {
66
pathname: string;
77
action?: Action;
8-
} & Record<string, unknown>;
8+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
9+
} & Record<string, any>;
910

1011
export type ReactRouterInstrumentation = <T extends Transaction>(
1112
startTransaction: (context: TransactionContext) => T | undefined,

0 commit comments

Comments
 (0)