UNPKG

tspace-spear

Version:

tspace-spear is a lightweight API framework for Node.js that is fast and highly focused on providing the best developer experience. It utilizes the native HTTP server

25 lines (24 loc) 805 B
/// <reference types="node" /> import { IncomingMessage, ServerResponse } from "http"; import { type TBody, type TFiles, type TSwaggerDoc } from '../types'; export declare class ParserFactory { files(req: IncomingMessage, options: { limit: number; tempFileDir: string; removeTempFile: { remove: boolean; ms: number; }; }): Promise<{ body: TBody; files: TFiles; }>; body(req: IncomingMessage): Promise<unknown>; cookies(req: IncomingMessage): Record<string, any> | null; swagger(doc: TSwaggerDoc): { path: `/${string}` | undefined; staticUrl: string; staticSwaggerHandler: (req: IncomingMessage, res: ServerResponse, params: Record<string, any>) => void; html: string; }; }