Types
MiddlewareFunc
type MiddlewareFunc = (req: IncomingMessage, res: ServerResponse<IncomingMessage> & { req: IncomingMessage; }, next: () => void | Promise<void>) => void | Promise<void>;
Functions
use
declare const use: <IncomingMessageT extends IncomingMessage>(...list: MiddlewareFunc[]) => (req: IncomingMessageT, res: ServerResponse<IncomingMessageT> & { req: IncomingMessageT; }) => Promise<void>;
All
import { IncomingMessage, ServerResponse } from 'node:http';
type MiddlewareFunc = (req: IncomingMessage, res: ServerResponse<IncomingMessage> & {
req: IncomingMessage;
}, next: () => void | Promise<void>) => void | Promise<void>;
declare const use: <IncomingMessageT extends IncomingMessage>(...list: MiddlewareFunc[]) => (req: IncomingMessageT, res: ServerResponse<IncomingMessageT> & {
req: IncomingMessageT;
}) => Promise<void>;
export { use };
Types
ResponseTypes
type ResponseTypes = void | null | Response | boolean;
MiddlewareFunc
type MiddlewareFunc = (req: Request) => ResponseTypes | Promise<ResponseTypes>;
Functions
use
declare const use: (...list: MiddlewareFunc[]) => (req: Request) => Promise<Response | void>;
All
type ResponseTypes = void | null | Response | boolean;
type MiddlewareFunc = (req: Request) => ResponseTypes | Promise<ResponseTypes>;
declare const use: (...list: MiddlewareFunc[]) => (req: Request) => Promise<Response | void>;
export { use };
Types
ResponseTypes
type ResponseTypes = void | null | Response | boolean;
MiddlewareFunc
type MiddlewareFunc = (req: Request) => ResponseTypes | Promise<ResponseTypes>;
Functions
use
declare const use: (...list: MiddlewareFunc[]) => (req: Request) => Promise<Response | void>;
All
type ResponseTypes = void | null | Response | boolean;
type MiddlewareFunc = (req: Request) => ResponseTypes | Promise<ResponseTypes>;
declare const use: (...list: MiddlewareFunc[]) => (req: Request) => Promise<Response | void>;
export { use };
Types
MiddlewareFunc
type MiddlewareFunc = (req: IncomingMessage, res: ServerResponse<IncomingMessage> & { req: IncomingMessage; }, next: () => void | Promise<void>) => void | Promise<void>;
Functions
use
declare const use: <IncomingMessageT extends IncomingMessage>(...list: MiddlewareFunc[]) => (req: IncomingMessageT, res: ServerResponse<IncomingMessageT> & { req: IncomingMessageT; }) => Promise<void>;
All
import { IncomingMessage, ServerResponse } from 'node:http';
type MiddlewareFunc = (req: IncomingMessage, res: ServerResponse<IncomingMessage> & {
req: IncomingMessage;
}, next: () => void | Promise<void>) => void | Promise<void>;
declare const use: <IncomingMessageT extends IncomingMessage>(...list: MiddlewareFunc[]) => (req: IncomingMessageT, res: ServerResponse<IncomingMessageT> & {
req: IncomingMessageT;
}) => Promise<void>;
export { use };