chore: 删除不再使用的文件并更新路由上下文以支持自定义字段

This commit is contained in:
2026-02-24 01:01:43 +08:00
parent f8337a1216
commit 52b10f2f03
16 changed files with 73 additions and 224 deletions

View File

@@ -19,7 +19,7 @@ type AppOptions<T = {}> = {
appId?: string;
};
export type AppRouteContext<T = {}> = HandleCtx & RouteContext<T> & { app: App<T> };
export type AppRouteContext<T> = HandleCtx & RouteContext<T> & { app: App<T> };
/**
* 封装了 Router 和 Server 的 App 模块处理http的请求和响应内置了 Cookie 和 Token 和 res 的处理
@@ -29,6 +29,7 @@ export class App<U = {}> extends QueryRouterServer<AppRouteContext<U>> {
declare appId: string;
router: QueryRouterServer;
server: ServerType;
declare context: AppRouteContext<U>;
constructor(opts?: AppOptions<U>) {
super({ initHandle: false, context: { needSerialize: true, ...opts?.routerContext } as any });
const router = this;