fix: temp

This commit is contained in:
2026-02-18 08:58:53 +08:00
parent 40a8825ea2
commit f72f7d6cf1

View File

@@ -137,7 +137,6 @@ export class Route<U = { [key: string]: any }, T extends SimpleObject = SimpleOb
metadata?: T; metadata?: T;
middleware?: RouteMiddleware[]; // middleware middleware?: RouteMiddleware[]; // middleware
type? = 'route'; type? = 'route';
data?: any;
/** /**
* 是否开启debug开启后会打印错误信息 * 是否开启debug开启后会打印错误信息
*/ */
@@ -241,10 +240,6 @@ export class Route<U = { [key: string]: any }, T extends SimpleObject = SimpleOb
addTo(router: QueryRouter | { add: (route: Route) => void;[key: string]: any }, opts?: AddOpts) { addTo(router: QueryRouter | { add: (route: Route) => void;[key: string]: any }, opts?: AddOpts) {
router.add(this, opts); router.add(this, opts);
} }
setData(data: any) {
this.data = data;
return this;
}
throw(code?: number | string, message?: string, tips?: string): void; throw(code?: number | string, message?: string, tips?: string): void;
throw(...args: any[]) { throw(...args: any[]) {
throw new CustomError(...args); throw new CustomError(...args);