https://project.mdnd-it.cc/work_packages/94
This commit is contained in:
2025-08-23 04:25:28 +02:00
parent 725516ad6c
commit 19cfa031d0
25823 changed files with 1095587 additions and 2801760 deletions
+5 -7
View File
@@ -1,5 +1,3 @@
import { Readable } from 'stream';
declare namespace getRawBody {
export type Encoding = string | true;
@@ -58,29 +56,29 @@ declare namespace getRawBody {
* limit. Ideal for parsing request bodies.
*/
declare function getRawBody(
stream: Readable,
stream: NodeJS.ReadableStream,
callback: (err: getRawBody.RawBodyError, body: Buffer) => void
): void;
declare function getRawBody(
stream: Readable,
stream: NodeJS.ReadableStream,
options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding,
callback: (err: getRawBody.RawBodyError, body: string) => void
): void;
declare function getRawBody(
stream: Readable,
stream: NodeJS.ReadableStream,
options: getRawBody.Options,
callback: (err: getRawBody.RawBodyError, body: Buffer) => void
): void;
declare function getRawBody(
stream: Readable,
stream: NodeJS.ReadableStream,
options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding
): Promise<string>;
declare function getRawBody(
stream: Readable,
stream: NodeJS.ReadableStream,
options?: getRawBody.Options
): Promise<Buffer>;