fix(core): update
This commit is contained in:
17
ts/servertools/classes.handler.ts
Normal file
17
ts/servertools/classes.handler.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as plugins from '../typedserver.plugins.js';
|
||||
import { Request, Response } from 'express';
|
||||
|
||||
export interface IHandlerFunction {
|
||||
(requestArg: Request, responseArg: Response): void;
|
||||
}
|
||||
|
||||
export type THttpMethods = 'ALL' | 'GET' | 'POST' | 'PUT' | 'DELETE';
|
||||
|
||||
export class Handler {
|
||||
httpMethod: THttpMethods;
|
||||
handlerFunction: IHandlerFunction;
|
||||
constructor(httpMethodArg: THttpMethods, handlerArg: IHandlerFunction) {
|
||||
this.httpMethod = httpMethodArg;
|
||||
this.handlerFunction = handlerArg;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user