added doga
This commit is contained in:
15
25_02_24/node_modules/milliparsec/dist/index.d.ts
generated
vendored
Normal file
15
25_02_24/node_modules/milliparsec/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { EventEmitter } from 'node:events';
|
||||
import type { IncomingMessage, ServerResponse as Response } from 'node:http';
|
||||
type NextFunction = (err?: any) => void;
|
||||
export type ReqWithBody<T = any> = IncomingMessage & {
|
||||
body?: T;
|
||||
} & EventEmitter;
|
||||
export declare const hasBody: (method: string) => boolean;
|
||||
export declare const p: <T = any>(fn: (body: any) => any) => (req: ReqWithBody<T>, _res: Response, next: (err?: any) => void) => Promise<any>;
|
||||
declare const custom: <T = any>(fn: (body: any) => any) => (req: ReqWithBody, _res: Response, next: NextFunction) => Promise<void>;
|
||||
declare const json: () => (req: ReqWithBody, res: Response, next: NextFunction) => Promise<void>;
|
||||
declare const raw: () => (req: ReqWithBody, _res: Response, next: NextFunction) => Promise<void>;
|
||||
declare const text: () => (req: ReqWithBody, _res: Response, next: NextFunction) => Promise<void>;
|
||||
declare const urlencoded: () => (req: ReqWithBody, res: Response, next: NextFunction) => Promise<void>;
|
||||
declare const multipart: () => (req: ReqWithBody, res: Response, next: NextFunction) => Promise<void>;
|
||||
export { custom, json, raw, text, urlencoded, multipart };
|
||||
Reference in New Issue
Block a user