Migrate project from typing_practiceweb

This commit is contained in:
2026-05-14 16:04:14 +08:00
parent dbc5425706
commit 0e87d5546d
225 changed files with 92811 additions and 0 deletions

26
server/global.d.ts vendored Normal file
View File

@@ -0,0 +1,26 @@
import { Request, Response, NextFunction } from 'express';
declare global {
namespace Express {
interface Request {
user: {
_id: string;
username: string;
fullname?: string;
isAdmin?: boolean;
};
}
}
}
// 解决TypeScript类型错误
declare module 'express-serve-static-core' {
interface Router {
get: any;
post: any;
put: any;
delete: any;
}
}
export {};