This commit is contained in:
2025-10-24 21:15:02 +08:00
parent ac32ff9d4a
commit 87068cd626
3 changed files with 58 additions and 1 deletions

View File

@@ -103,7 +103,7 @@ export type RouteOpts = {
isDebug?: boolean;
};
export type DefineRouteOpts = Omit<RouteOpts, 'idUsePath' | 'verify' | 'verifyKey' | 'nextRoute'>;
const pickValue = ['path', 'key', 'id', 'description', 'type', 'validator', 'middleware'] as const;
const pickValue = ['path', 'key', 'id', 'description', 'type', 'validator', 'middleware', 'metadata'] as const;
export type RouteInfo = Pick<Route, (typeof pickValue)[number]>;
export class Route<U = { [key: string]: any }> {
/**