File
Blob: src/node/internal/streams_legacy.d.ts
| 1 | // Copyright (c) 2017-2022 Cloudflare, Inc. |
| 2 | // Licensed under the Apache 2.0 license found in the LICENSE file or at: |
| 3 | // https://opensource.org/licenses/Apache-2.0 |
| 4 | |
| 5 | import NodeJSStream from 'node:stream'; |
| 6 | import EventEmitter from 'node:events'; |
| 7 | |
| 8 | export declare class Stream extends NodeJSStream.Stream { |
| 9 | static isWritable: typeof NodeJSStream.isWritable; |
| 10 | static isDistributed: typeof NodeJSStream.isDistributed; |
| 11 | static compose: typeof NodeJSStream.compose; |
| 12 | static destroy: typeof NodeJSStream.destroy; |
| 13 | static finished: typeof NodeJSStream.finished; |
| 14 | static pipeline: typeof NodeJSStream.pipeline; |
| 15 | static isDisturbed: typeof NodeJSStream.isDisturbed; |
| 16 | static isDestroyed: typeof NodeJSStream.isDestroyed; |
| 17 | |
| 18 | static isReadable(stream: NodeStreamLike): boolean | null; |
| 19 | static _isArrayBufferView(value: unknown): value is ArrayBufferView; |
| 20 | static _isUint8Array(value: unknown): value is Uint8Array; |
| 21 | static _uint8ArrayToBuffer(value: Uint8Array): NodeJS.Buffer; |
| 22 | |
| 23 | static Stream: typeof Stream; |
| 24 | |
| 25 | aborted?: boolean; |
| 26 | readable: boolean; |
| 27 | writable: boolean; |
| 28 | destroyed: boolean; |
| 29 | req: EventEmitter; |
| 30 | |
| 31 | _writableState: { |
| 32 | errorEmitted: boolean; |
| 33 | pendingcb?: number; |
| 34 | }; |
| 35 | _readableState: { |
| 36 | errorEmitted: boolean; |
| 37 | }; |
| 38 | } |