Refactor type annotations and router initialization

Standardized type annotations for interfaces in user.ts and improved type safety in webapi.ts. Updated all Express router initializations to explicitly declare the Router type. Added missing RequestHandler typings in uploader modules for better type checking.
This commit is contained in:
手瓜一十雪 committed 2026-01-22 17:35:54 +08:00
1 parent e25dd38acd
commit dd9b2252b7
16 files changed
+123 -121

No files matched your search

@@ -3,7 +3,7 @@ import { GetThemeConfigHandler, GetNapCatVersion, QQVersionHandler, SetThemeConf
import { StatusRealTimeHandler } from '@/napcat-webui-backend/src/api/Status';
import { GetProxyHandler } from '../api/Proxy';
const router = Router();
const router: Router = Router();
// router: 获取nc的package.json信息
router.get('/QQVersion', QQVersionHandler);
router.get('/GetNapCatVersion', GetNapCatVersion);