@anyhowstep/ts-route-server
Version:
19 lines (17 loc) • 462 B
text/typescript
import {Request} from "./Request";
import {Response} from "./Response";
import {NextFunction, VoidNextFunction} from "./NextFunction";
export interface Handler<P, B, Q, D, M, L, N> {
(
req: Request<P, B, Q>,
res: Response<D, M, L>,
next: NextFunction<N>
): void;
}
export interface VoidHandler<P, B, Q, D, M, L> {
(
req: Request<P, B, Q>,
res: Response<D, M, L>,
next: VoidNextFunction
): void;
}