tspace-0spear
Version:
tspace-0spear is a lightweight API framework for Node.js that is fast and highly focused on providing the best developer experience. It aims to be performant HTTP & Websocket Server using uWebSockets written in C++.
28 lines (27 loc) • 868 B
TypeScript
import { IncomingMessage, ServerResponse } from "http";
import { TBody, TFiles, TSwaggerDoc } from '../types';
export declare class ParserFactory {
files({ req, res, options }: {
req: IncomingMessage;
res: any;
options: {
limit: number;
tempFileDir: string;
removeTempFile: {
remove: boolean;
ms: number;
};
};
}): Promise<{
body: TBody;
files: TFiles;
}>;
body(res: any): 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>) => ServerResponse<IncomingMessage>;
html: string;
};
}