Support passing function only in Node writable.end()

This commit is contained in:
Guangcong Luo
2017-12-14 19:22:16 -06:00
parent 14d6d73e6d
commit 62f093e09c
5 changed files with 15 additions and 15 deletions
+3 -3
View File
@@ -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;
+3 -3
View File
@@ -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;
}
+3 -3
View File
@@ -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;
}
+3 -3
View File
@@ -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;
}
+3 -3
View File
@@ -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;
}