mirror of https://github.com/grpc/grpc-node.git
Merge pull request #2007 from murgatroid99/grpc-js_types_node_fix
grpc-js: Fix compatibility with @types/node 17.0.6
This commit is contained in:
commit
a65fdcedb9
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@grpc/grpc-js",
|
||||
"version": "1.4.5",
|
||||
"version": "1.4.6",
|
||||
"description": "gRPC Library for Node - pure JS implementation",
|
||||
"homepage": "https://grpc.io/",
|
||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||
|
|
|
@ -36,9 +36,9 @@ export interface IntermediateObjectWritable<T> extends Writable {
|
|||
write(chunk: any & T, cb?: WriteCallback): boolean;
|
||||
write(chunk: any & T, encoding?: any, cb?: WriteCallback): boolean;
|
||||
setDefaultEncoding(encoding: string): this;
|
||||
end(): void;
|
||||
end(chunk: any & T, cb?: Function): void;
|
||||
end(chunk: any & T, encoding?: any, cb?: Function): void;
|
||||
end(): ReturnType<Writable['end']> extends Writable ? this : void;
|
||||
end(chunk: any & T, cb?: Function): ReturnType<Writable['end']> extends Writable ? this : void;
|
||||
end(chunk: any & T, encoding?: any, cb?: Function): ReturnType<Writable['end']> extends Writable ? this : void;
|
||||
}
|
||||
|
||||
export interface ObjectWritable<T> extends IntermediateObjectWritable<T> {
|
||||
|
@ -46,20 +46,7 @@ export interface ObjectWritable<T> extends IntermediateObjectWritable<T> {
|
|||
write(chunk: T, cb?: Function): boolean;
|
||||
write(chunk: T, encoding?: any, cb?: Function): boolean;
|
||||
setDefaultEncoding(encoding: string): this;
|
||||
end(): void;
|
||||
end(chunk: T, cb?: Function): void;
|
||||
end(chunk: T, encoding?: any, cb?: Function): void;
|
||||
end(): ReturnType<Writable['end']> extends Writable ? this : void;
|
||||
end(chunk: T, cb?: Function): ReturnType<Writable['end']> extends Writable ? this : void;
|
||||
end(chunk: T, encoding?: any, cb?: Function): ReturnType<Writable['end']> extends Writable ? this : void;
|
||||
}
|
||||
|
||||
export type ObjectDuplex<T, U> = {
|
||||
read(size?: number): U;
|
||||
|
||||
_write(chunk: T, encoding: string, callback: Function): void;
|
||||
write(chunk: T, cb?: Function): boolean;
|
||||
write(chunk: T, encoding?: any, cb?: Function): boolean;
|
||||
end(): void;
|
||||
end(chunk: T, cb?: Function): void;
|
||||
end(chunk: T, encoding?: any, cb?: Function): void;
|
||||
} & Duplex &
|
||||
ObjectWritable<T> &
|
||||
ObjectReadable<U>;
|
||||
|
|
|
@ -236,7 +236,7 @@ export class ServerWritableStreamImpl<RequestType, ResponseType>
|
|||
this.trailingMetadata = metadata;
|
||||
}
|
||||
|
||||
super.end();
|
||||
return super.end();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ export class ServerDuplexStreamImpl<RequestType, ResponseType>
|
|||
this.trailingMetadata = metadata;
|
||||
}
|
||||
|
||||
super.end();
|
||||
return super.end();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,6 @@ ServerDuplexStreamImpl.prototype._write =
|
|||
ServerWritableStreamImpl.prototype._write;
|
||||
ServerDuplexStreamImpl.prototype._final =
|
||||
ServerWritableStreamImpl.prototype._final;
|
||||
ServerDuplexStreamImpl.prototype.end = ServerWritableStreamImpl.prototype.end;
|
||||
|
||||
// Unary response callback signature.
|
||||
export type sendUnaryData<ResponseType> = (
|
||||
|
|
Loading…
Reference in New Issue