import { RequestResponseType, ServiceRequest } from './request'; import { ServiceRequestFactory, ServiceRequestFactoryRequestType } from './ServiceRequestFactory'; import { Dispatcher } from './Dispatcher'; export type HandleRequestFn = (request: R, next: HandleRequest, dispatch: Dispatcher) => RequestResponseType; export interface HandleRequest { (request: R): any; } export interface HandleRequestKnown { (request: R): RequestResponseType; } export type FactoryRequestHandler, R extends ServiceRequest = ServiceRequestFactoryRequestType> = HandleRequestKnown; export interface HandlerNext { (next: HandleRequest): HandleRequest; } export interface HandlerFn { (dispatcher: Dispatcher): HandlerNext; } export interface Handler { /** * Name of the Handler. * Useful for debugging and uncaught exceptions. */ readonly name: string; /** * Optional description of the Handler. */ readonly description?: string | undefined; readonly fn: HandlerFn; } //# sourceMappingURL=handlers.d.ts.map