14 lines
592 B
TypeScript
14 lines
592 B
TypeScript
|
/// <reference types="node" />
|
||
|
import { IncomingMessage as Req, ServerResponse as Res } from 'node:http';
|
||
|
export type FormatProps = {
|
||
|
default?: () => void;
|
||
|
} & Record<string, any>;
|
||
|
export type FormatError = Error & {
|
||
|
status: number;
|
||
|
statusCode: number;
|
||
|
types: string[];
|
||
|
};
|
||
|
type next = (err?: FormatError) => void;
|
||
|
export declare const formatResponse: <Request_1 extends Req = Req, Response_1 extends Res<Req> = Res<Req>, Next extends next = next>(req: Request_1, res: Response_1, next: Next) => (obj: FormatProps) => Response_1;
|
||
|
export {};
|
||
|
//# sourceMappingURL=format.d.ts.map
|