bito-code-review[bot] commented on PR #41205:
URL: https://github.com/apache/superset/pull/41205#issuecomment-4744040971
<!-- Bito Reply -->
The issue is valid. The `any` type in `ComponentType<any>` and
`ComponentProps<any>` in `superset-frontend/src/views/routes.tsx` bypasses
TypeScript's type checking, which is discouraged.
To resolve this, you can replace `any` with `unknown` or a more specific
type if available. Given the context, `unknown` is a safer alternative that
forces explicit type narrowing when the component or props are used.
Would you like me to fetch all other comments on this PR to validate and
implement fixes for them as well?
**superset-frontend/src/views/routes.tsx**
```
type Routes = {
path: string;
Component: ComponentType<unknown>;
Fallback?: ComponentType<unknown>;
props?: ComponentProps<unknown>;
}[];
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]