mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-26 10:56:19 +08:00
describe stream.Readable class
This commit is contained in:
18
node/node.d.ts
vendored
18
node/node.d.ts
vendored
@@ -1001,6 +1001,24 @@ declare module "stream" {
|
||||
pipe(destination: WritableStream, options?: { end?: boolean; }): void;
|
||||
}
|
||||
|
||||
export interface ReadableOptions {
|
||||
highWaterMark?: number;
|
||||
encoding?: string;
|
||||
objectMode?: boolean;
|
||||
}
|
||||
|
||||
export class Readable extends events.EventEmitter implements ReadableStream {
|
||||
readable: boolean;
|
||||
constructor(opts?: ReadableOptions);
|
||||
setEncoding(encoding: string): void;
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
destroy(): void;
|
||||
pipe(destination: WritableStream, options?: { end?: boolean; }): void;
|
||||
_read(): void;
|
||||
push(chunk: any, encoding?: string): boolean;
|
||||
}
|
||||
|
||||
export interface ReadWriteStream extends ReadableStream, WritableStream { }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user