From 62f093e09c6eef3ef1edfee04f877971b8546fe5 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sat, 9 Dec 2017 17:55:49 -0600 Subject: [PATCH] Support passing function only in Node writable.end() --- types/node/index.d.ts | 6 +++--- types/node/v0/index.d.ts | 6 +++--- types/node/v4/index.d.ts | 6 +++--- types/node/v6/index.d.ts | 6 +++--- types/node/v7/index.d.ts | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index c9dfcf3915..d715be540d 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -354,7 +354,7 @@ declare namespace NodeJS { writable: boolean; write(buffer: Buffer | string, cb?: Function): boolean; write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; + end(cb?: Function): void; end(buffer: Buffer, cb?: Function): void; end(str: string, cb?: Function): void; end(str: string, encoding?: string, cb?: Function): void; @@ -5280,7 +5280,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; cork(): void; @@ -5371,7 +5371,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; cork(): void; diff --git a/types/node/v0/index.d.ts b/types/node/v0/index.d.ts index ccf2e5e207..03671db5a3 100644 --- a/types/node/v0/index.d.ts +++ b/types/node/v0/index.d.ts @@ -221,7 +221,7 @@ declare namespace NodeJS { writable: boolean; write(buffer: Buffer|string, cb?: Function): boolean; write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; + end(cb?: Function): void; end(buffer: Buffer, cb?: Function): void; end(str: string, cb?: Function): void; end(str: string, encoding?: string, cb?: Function): void; @@ -1804,7 +1804,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; } @@ -1821,7 +1821,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; } diff --git a/types/node/v4/index.d.ts b/types/node/v4/index.d.ts index 5658d4e05e..f257c3b917 100644 --- a/types/node/v4/index.d.ts +++ b/types/node/v4/index.d.ts @@ -291,7 +291,7 @@ declare namespace NodeJS { writable: boolean; write(buffer: Buffer|string, cb?: Function): boolean; write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; + end(cb?: Function): void; end(buffer: Buffer, cb?: Function): void; end(str: string, cb?: Function): void; end(str: string, encoding?: string, cb?: Function): void; @@ -2271,7 +2271,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; } @@ -2290,7 +2290,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; } diff --git a/types/node/v6/index.d.ts b/types/node/v6/index.d.ts index e8931e43cf..2e2303e898 100644 --- a/types/node/v6/index.d.ts +++ b/types/node/v6/index.d.ts @@ -301,7 +301,7 @@ declare namespace NodeJS { writable: boolean; write(buffer: Buffer | string, cb?: Function): boolean; write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; + end(cb?: Function): void; end(buffer: Buffer, cb?: Function): void; end(str: string, cb?: Function): void; end(str: string, encoding?: string, cb?: Function): void; @@ -3564,7 +3564,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; @@ -3649,7 +3649,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; } diff --git a/types/node/v7/index.d.ts b/types/node/v7/index.d.ts index cc87fadd7c..8ce6079614 100644 --- a/types/node/v7/index.d.ts +++ b/types/node/v7/index.d.ts @@ -313,7 +313,7 @@ declare namespace NodeJS { writable: boolean; write(buffer: Buffer | string, cb?: Function): boolean; write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; + end(cb?: Function): void; end(buffer: Buffer, cb?: Function): void; end(str: string, cb?: Function): void; end(str: string, encoding?: string, cb?: Function): void; @@ -3713,7 +3713,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; @@ -3798,7 +3798,7 @@ declare module "stream" { write(chunk: any, cb?: Function): boolean; write(chunk: any, encoding?: string, cb?: Function): boolean; setDefaultEncoding(encoding: string): this; - end(): void; + end(cb?: Function): void; end(chunk: any, cb?: Function): void; end(chunk: any, encoding?: string, cb?: Function): void; }