refactor: replace all explicit any types with proper TypeScript types
Backend resolvers: typed enrichArticle/enrichVideo/enrichModel with DB and $inferSelect types, SQL<unknown>[] for conditions arrays, proper enum casts for status/role fields, $inferInsert for .set() updates, typed raw SQL result rows in gamification, ReplyLike interface for ctx.reply in auth. Frontend: typed catch blocks with Error/interface casts, isActiveLink param, adminGetUser response, tags filter callback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -58,8 +58,8 @@
|
||||
isLiked = true;
|
||||
toast.success("Added to liked videos");
|
||||
}
|
||||
} catch (error: any) {
|
||||
toast.error(error.message || "Failed to update like");
|
||||
} catch (error) {
|
||||
toast.error((error instanceof Error ? error.message : null) || "Failed to update like");
|
||||
} finally {
|
||||
isLikeLoading = false;
|
||||
}
|
||||
@@ -86,8 +86,8 @@
|
||||
invalidateAll();
|
||||
newComment = "";
|
||||
showComments = true;
|
||||
} catch (err: any) {
|
||||
commentError = err.message;
|
||||
} catch (err) {
|
||||
commentError = err instanceof Error ? err.message : "Unknown error";
|
||||
isCommentError = true;
|
||||
} finally {
|
||||
isCommentLoading = false;
|
||||
|
||||
Reference in New Issue
Block a user