mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-05 01:30:17 +00:00
Fix wrong stream TransformOptions interface. (#11849)
Transform streams are duplex streams and extend the latter's constructor options.
This commit is contained in:
committed by
Mohamed Hegazy
parent
d898304c56
commit
cc3ca26de4
@@ -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
2
node/node.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user