flow-middleware
Advanced tools
Comparing version
import { Handler } from 'express'; | ||
import { THandler } from './types'; | ||
export default function flow<TReqExt = {}, TResExt = {}>(...middlewares: Handler[]): THandler<TReqExt, TResExt>; | ||
export default function flow<TReqExt = {}, TResExt = {}>(...middlewares: Handler[]): THandler<TResExt, TResExt>; |
/// <reference types="node" /> | ||
import { Handler } from 'express'; | ||
import { Handler, Request as ExpressRequest, Response as ExpressResponse } from 'express'; | ||
import { IncomingMessage, ServerResponse } from 'http'; | ||
export declare type THandler<ReqExt = {}, ResExt = {}> = (req: IncomingMessage, res: ServerResponse) => Promise<[ReqExt, ResExt]>; | ||
export declare type THandler<ReqExt, ResExt> = (req: IncomingMessage, res: ServerResponse) => Promise<[ExpressRequest & Partial<ReqExt>, ExpressResponse & Partial<ResExt>]>; | ||
export interface TCompose<ReqExt = {}, ResExt = {}> { | ||
@@ -6,0 +6,0 @@ <ReqExt, ResExt>(): THandler<ReqExt, ResExt>; |
{ | ||
"name": "flow-middleware", | ||
"version": "0.2.1", | ||
"version": "0.2.2-alpha.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:piglovesyou/compose-middleware.git", |
17061
0.63%