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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user