fix(types): remove unnecessary as any casts in web components

- ProjectHealthWidget: row already typed as ProjectHealthRow with id field
- ResourceDetail: use narrowed unknown cast instead of any for error code
- provider.tsx: same pattern for TRPCClientError data access
- ChatPanel: use intersection type for Next.js typed route push

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 15:13:06 +02:00
parent 9051ff73d0
commit 0d79f97d7a
4 changed files with 431 additions and 206 deletions
+4 -2
View File
@@ -20,8 +20,10 @@ function redirectToSignIn(): void {
}
function isUnauthorizedTrpcError(error: unknown): boolean {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return error instanceof TRPCClientError && (error as any).data?.code === "UNAUTHORIZED";
return (
error instanceof TRPCClientError &&
(error as unknown as { data?: { code?: string } }).data?.code === "UNAUTHORIZED"
);
}
function isIgnorableTransportError(error: unknown): boolean {