UNPKG

kequapp

Version:

A minimal, zero-magic Node web framework built on native APIs

29 lines (28 loc) 1.06 kB
/** biome-ignore-all lint/suspicious/noExplicitAny: too many possibilities */ import { type OutgoingHttpHeaders } from 'node:http'; import { Transform } from 'node:stream'; import type { THeader, TParams, TReqOptions } from '../types.ts'; export declare class FakeReq extends Transform { [key: string]: any; method: string; url: string; headers: TParams; rawHeaders: string[]; constructor(options: TReqOptions); _transform(chunk: string | Buffer, _enc: string, done: () => void): void; } export declare class FakeRes extends Transform { statusCode: number; statusMessage: string; private _headers; private _responseData; constructor(); _transform(chunk: Buffer, _enc: string, done: () => void): void; setHeader(name: string, value: THeader): void; getHeader(name: string): THeader; getHeaders(): OutgoingHttpHeaders; removeHeader(name: string): void; writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders): void; _getString(): string; _getJSON(): any; }