UNPKG

@bestcodetools/api-node-base

Version:

BestCodeTools Node Base for Backend API

13 lines 935 B
import express, { NextFunction } from 'express'; import ICommand from "../../../@types/interfaces/command"; import IFactory from "../../../@types/interfaces/factory"; import IHttpHandler from "../../../@types/interfaces/http/handler"; declare type HandlerCtor<THandlerAdditional> = ({ new (request: express.Request, response: express.Response, next: NextFunction, command: ICommand<unknown, unknown>, handlerAdditional?: THandlerAdditional): IHttpHandler; }); declare type FactoryCtor = ({ new (): IFactory; }); declare const adapter: <THandler extends HandlerCtor<THandlerAdditional> = HandlerCtor<any>, TFactory extends FactoryCtor = FactoryCtor, THandlerAdditional extends unknown = any>(handler: THandler, factory: TFactory, handlerAdditional?: THandlerAdditional | undefined) => (request: express.Request, response: express.Response, next: NextFunction) => void; export default adapter; //# sourceMappingURL=index.d.ts.map