(
name: T, callback: (HandlerClass: T extends `${string}ConnectionHandler` ? typeof ConnectionHandler : typeof Handler) => any,
)
| 813 | } |
| 814 | |
| 815 | public withHandlerClass<T extends string>( |
| 816 | name: T, callback: (HandlerClass: T extends `${string}ConnectionHandler` ? typeof ConnectionHandler : typeof Handler) => any, |
| 817 | ) { |
| 818 | name = name.replace(/Handler$/, '') as any; |
| 819 | if (this.registry[name]) callback(this.registry[name]); |
| 820 | // FIXME: should pass type check |
| 821 | this.ctx.on(`handler/register/${name}`, callback as any); |
| 822 | } |
| 823 | |
| 824 | // eslint-disable-next-line ts/naming-convention |
| 825 | public Route(name: string, path: string, RouteHandler: typeof Handler, ...permPrivChecker) { |
no test coverage detected