mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
node: stream.finished: err is optional
This commit is contained in:
parent
f4b9e5acaa
commit
a649bec809
2
types/node/index.d.ts
vendored
2
types/node/index.d.ts
vendored
@ -6415,7 +6415,7 @@ declare module "stream" {
|
||||
|
||||
export class PassThrough extends Transform { }
|
||||
|
||||
export function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback?: (err: NodeJS.ErrnoException) => void): () => void;
|
||||
export function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException) => void): () => void;
|
||||
export namespace finished {
|
||||
export function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise<void>;
|
||||
}
|
||||
|
||||
@ -1124,10 +1124,10 @@ function simplified_stream_ctor_test() {
|
||||
}
|
||||
|
||||
function streamPipelineFinished() {
|
||||
const cancel = stream.finished(process.stdin, (err: Error) => {});
|
||||
const cancel = stream.finished(process.stdin, (err?: Error) => {});
|
||||
cancel();
|
||||
|
||||
stream.pipeline(process.stdin, process.stdout, (err: Error) => {});
|
||||
stream.pipeline(process.stdin, process.stdout, (err?: Error) => {});
|
||||
}
|
||||
|
||||
async function asyncStreamPipelineFinished() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user