<type>api
/

dist/index.d.ts

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 };

dist/fetch.d.mts

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 };

dist/fetch.d.ts

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 };

dist/index.d.mts

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 };