UNPKG

tspace-spear

Version:

tspace-spear is a lightweight, high-performance API framework for Node.js that leverages the native HTTP server and supports uWebSockets.js (C++) for maximum speed and efficiency.

32 lines (31 loc) 1.01 kB
import { IncomingMessage, ServerResponse } from "http"; import { type T } from "../types"; export declare class ParserFactory { private uWebStockets; private net; useAdater(adapter: T.Adapter): this; queryString(url: string): Record<string, any>; files({ req, res, options, }: { req: T.Request; res: T.Response; options: { limit: number; tempFileDir: string; removeTempFile: { remove: boolean; ms: number; }; }; }): Promise<{ body: any; files: any; }>; body(req: T.Request, res: T.Response): Promise<T.Body>; cookies(req: T.Request): Record<string, any> | null; swagger(doc: T.Swagger.Doc): Promise<{ path: `/${string}` | undefined; staticUrl: string; staticSwaggerHandler: (req: IncomingMessage, res: ServerResponse, params: Record<string, string>) => ServerResponse<IncomingMessage>; html: string; }>; }