Pinsave/counterstrike
1
1/**2 * The utility consumer functions provide common options for consuming3 * streams.4 * @since v16.7.05 */6declare module "stream/consumers" {7 import { Blob as NodeBlob } from "node:buffer";8 import { ReadableStream as WebReadableStream } from "node:stream/web";9 /**10 * @since v16.7.011 * @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream.12 */13 function arrayBuffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;14 /**15 * @since v16.7.016 * @returns Fulfills with a `Blob` containing the full contents of the stream.17 */18 function blob(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NodeBlob>;19 /**20 * @since v16.7.021 * @returns Fulfills with a `Buffer` containing the full contents of the stream.22 */23 function buffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<Buffer>;24 /**25 * @since v16.7.026 * @returns Fulfills with the contents of the stream parsed as a27 * UTF-8 encoded string that is then passed through `JSON.parse()`.28 */29 function json(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;30 /**31 * @since v16.7.032 * @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string.33 */34 function text(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;35}36declare module "node:stream/consumers" {37 export * from "stream/consumers";38}39 