mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
Replace module "stream" chunk: string or chunk: Buffer arguments with `chunk:
any`
This commit is contained in:
Vendored
+17
-27
@@ -1671,14 +1671,13 @@ declare module "stream" {
|
||||
readable: boolean;
|
||||
constructor(opts?: ReadableOptions);
|
||||
_read(size: number): void;
|
||||
read(size?: number): string|Buffer;
|
||||
read(size?: number): any;
|
||||
setEncoding(encoding: string): void;
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
||||
unpipe<T extends NodeJS.WritableStream>(destination?: T): void;
|
||||
unshift(chunk: string): void;
|
||||
unshift(chunk: Buffer): void;
|
||||
unshift(chunk: any): void;
|
||||
wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream;
|
||||
push(chunk: any, encoding?: string): boolean;
|
||||
}
|
||||
@@ -1691,15 +1690,12 @@ declare module "stream" {
|
||||
export class Writable extends events.EventEmitter implements NodeJS.WritableStream {
|
||||
writable: boolean;
|
||||
constructor(opts?: WritableOptions);
|
||||
_write(data: Buffer, encoding: string, callback: Function): void;
|
||||
_write(data: string, encoding: string, callback: Function): void;
|
||||
write(buffer: Buffer, cb?: Function): boolean;
|
||||
write(str: string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, cb?: Function): boolean;
|
||||
_write(chunk: any, encoding: string, callback: Function): void;
|
||||
write(chunk: any, cb?: Function): boolean;
|
||||
write(chunk: any, encoding?: string, cb?: Function): boolean;
|
||||
end(): void;
|
||||
end(buffer: Buffer, cb?: Function): void;
|
||||
end(str: string, cb?: Function): void;
|
||||
end(str: string, encoding?: string, cb?: Function): void;
|
||||
end(chunk: any, cb?: Function): void;
|
||||
end(chunk: any, encoding?: string, cb?: Function): void;
|
||||
}
|
||||
|
||||
export interface DuplexOptions extends ReadableOptions, WritableOptions {
|
||||
@@ -1710,15 +1706,12 @@ declare module "stream" {
|
||||
export class Duplex extends Readable implements NodeJS.ReadWriteStream {
|
||||
writable: boolean;
|
||||
constructor(opts?: DuplexOptions);
|
||||
_write(data: Buffer, encoding: string, callback: Function): void;
|
||||
_write(data: string, encoding: string, callback: Function): void;
|
||||
write(buffer: Buffer, cb?: Function): boolean;
|
||||
write(str: string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, cb?: Function): boolean;
|
||||
_write(chunk: any, encoding: string, callback: Function): void;
|
||||
write(chunk: any, cb?: Function): boolean;
|
||||
write(chunk: any, encoding?: string, cb?: Function): boolean;
|
||||
end(): void;
|
||||
end(buffer: Buffer, cb?: Function): void;
|
||||
end(str: string, cb?: Function): void;
|
||||
end(str: string, encoding?: string, cb?: Function): void;
|
||||
end(chunk: any, cb?: Function): void;
|
||||
end(chunk: any, encoding?: string, cb?: Function): void;
|
||||
}
|
||||
|
||||
export interface TransformOptions extends ReadableOptions, WritableOptions {}
|
||||
@@ -1736,17 +1729,14 @@ declare module "stream" {
|
||||
resume(): void;
|
||||
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
||||
unpipe<T extends NodeJS.WritableStream>(destination?: T): void;
|
||||
unshift(chunk: string): void;
|
||||
unshift(chunk: Buffer): void;
|
||||
unshift(chunk: any): void;
|
||||
wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream;
|
||||
push(chunk: any, encoding?: string): boolean;
|
||||
write(buffer: Buffer, cb?: Function): boolean;
|
||||
write(str: string, cb?: Function): boolean;
|
||||
write(str: string, encoding?: string, cb?: Function): boolean;
|
||||
write(chunk: any, cb?: Function): boolean;
|
||||
write(chunk: any, encoding?: string, cb?: Function): boolean;
|
||||
end(): void;
|
||||
end(buffer: Buffer, cb?: Function): void;
|
||||
end(str: string, cb?: Function): void;
|
||||
end(str: string, encoding?: string, cb?: Function): void;
|
||||
end(chunk: any, cb?: Function): void;
|
||||
end(chunk: any, encoding?: string, cb?: Function): void;
|
||||
}
|
||||
|
||||
export class PassThrough extends Transform {}
|
||||
|
||||
Reference in New Issue
Block a user