This commit is contained in:
undefined committed 2025-03-08 18:20:23 +08:00
1 parent 0aecafcd00
commit 4c086db05c
4 files changed
+13 -16

No files matched your search

+2 -3
View File
@@ -712,14 +712,13 @@ ${c.response.status} ${endTime - startTime}ms ${c.response.length}`);
this.ctx.on(`handler/register/${name}`, callback as any);
}
// FIXME: should be typeof Handler<Context> instead of any
// eslint-disable-next-line @typescript-eslint/naming-convention
public Route(name: string, path: string, RouteHandler: any, ...permPrivChecker) {
public Route(name: string, path: string, RouteHandler: typeof Handler<C>, ...permPrivChecker) {
return this.register('route', name, path, RouteHandler, ...permPrivChecker);
}
// eslint-disable-next-line @typescript-eslint/naming-convention
public Connection(name: string, path: string, RouteHandler: any, ...permPrivChecker) {
public Connection(name: string, path: string, RouteHandler: typeof ConnectionHandler<C>, ...permPrivChecker) {
return this.register('conn', name, path, RouteHandler, ...permPrivChecker);
}