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:
@@ -66,8 +66,8 @@
|
||||
});
|
||||
toast.success($_("admin.article_form.update_success"));
|
||||
goto("/admin/articles");
|
||||
} catch (e: any) {
|
||||
toast.error(e?.message ?? $_("admin.article_form.update_error"));
|
||||
} catch (e) {
|
||||
toast.error((e instanceof Error ? e.message : null) ?? $_("admin.article_form.update_error"));
|
||||
} finally {
|
||||
saving = false;
|
||||
}
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
});
|
||||
toast.success($_("admin.article_form.create_success"));
|
||||
goto("/admin/articles");
|
||||
} catch (e: any) {
|
||||
toast.error(e?.message ?? $_("admin.article_form.create_error"));
|
||||
} catch (e) {
|
||||
toast.error((e instanceof Error ? e.message : null) ?? $_("admin.article_form.create_error"));
|
||||
} finally {
|
||||
saving = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user