123456789101112131415161718192021222324252627282930313233 |
- abstract class HttpHandler {
- protected abstract order: number;
- protected abstract route: string | null;
- protected abstract action: (...any: any[]) => any;
- protected context: any;
-
- public constructor(context: Record<string, any>) {
- this.context = context ?? null;
- }
- public setContext(context: Record<string, any>): HttpHandler {
- this.context = context;
- return this;
- }
- public getContext(): Record<string, any> {
- return this.context;
- }
- public getRoute(): string | null {
- return this.route;
- }
- public getAction(): (...any: any[]) => any {
- return this.action;
- }
- public getOrder(): number {
- return this.order;
- }
- }
- export { HttpHandler };
|