Fix wrong stream TransformOptions interface. (#11849)

Transform streams are duplex streams and extend the latter's constructor options.
This commit is contained in:
Marvin Hagemeister
2016-10-08 19:54:59 +02:00
committed by Mohamed Hegazy
parent d898304c56
commit cc3ca26de4
2 changed files with 6 additions and 3 deletions

View File

@@ -487,7 +487,10 @@ function simplified_stream_ctor_test() {
chunks[0].chunk.slice(0);
chunks[0].encoding.charAt(0);
cb();
}
},
allowHalfOpen: true,
readableObjectMode: true,
writableObjectMode: true
})
}
@@ -747,7 +750,7 @@ namespace tls_tests {
let _response: Buffer = response;
})
_TLSSocket = _TLSSocket.prependOnceListener("secureConnect", () => { });
}
}
}
////////////////////////////////////////////////////

2
node/node.d.ts vendored
View File

@@ -3276,7 +3276,7 @@ declare module "stream" {
end(chunk: any, encoding?: string, cb?: Function): void;
}
export interface TransformOptions extends ReadableOptions, WritableOptions {
export interface TransformOptions extends DuplexOptions {
transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any;
flush?: (callback: Function) => any;
}