File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ export interface IntermediateObjectWritable<T> extends Writable {
4949}
5050
5151export interface ObjectWritable < T > extends IntermediateObjectWritable < T > {
52- _write ( chunk : T | Buffer , encoding : string , callback : Function ) : void ;
53- write ( chunk : T | Buffer , cb ?: Function ) : boolean ;
54- write ( chunk : T | Buffer , encoding ?: any , cb ?: Function ) : boolean ;
52+ _write ( chunk : T , encoding : string , callback : Function ) : void ;
53+ write ( chunk : T , cb ?: Function ) : boolean ;
54+ write ( chunk : T , encoding ?: any , cb ?: Function ) : boolean ;
5555 setDefaultEncoding ( encoding : string ) : this;
5656 end ( ) : ReturnType < Writable [ 'end' ] > extends Writable ? this : void ;
5757 end (
Original file line number Diff line number Diff line change @@ -90,20 +90,32 @@ export type ServerSurfaceCall = {
9090 getPath ( ) : string ;
9191} & EventEmitter ;
9292
93+ export type ServerWritableBuffer < ResponseType > = {
94+ _write (
95+ chunk : ResponseType | Buffer ,
96+ encoding : string ,
97+ callback : Function
98+ ) : void ;
99+ write ( chunk : ResponseType | Buffer , cb ?: Function ) : boolean ;
100+ write ( chunk : ResponseType | Buffer , encoding ?: any , cb ?: Function ) : boolean ;
101+ } ;
102+
93103export type ServerUnaryCall < RequestType , ResponseType > = ServerSurfaceCall & {
94104 request : RequestType ;
95105} ;
96106export type ServerReadableStream < RequestType , ResponseType > =
97107 ServerSurfaceCall & ObjectReadable < RequestType > ;
98108export type ServerWritableStream < RequestType , ResponseType > =
99109 ServerSurfaceCall &
100- ObjectWritable < ResponseType > & {
110+ ObjectWritable < ResponseType > &
111+ ServerWritableBuffer < ResponseType > & {
101112 request : RequestType ;
102113 end : ( metadata ?: Metadata ) => void ;
103114 } ;
104115export type ServerDuplexStream < RequestType , ResponseType > = ServerSurfaceCall &
105116 ObjectReadable < RequestType > &
106- ObjectWritable < ResponseType > & { end : ( metadata ?: Metadata ) => void } ;
117+ ObjectWritable < ResponseType > &
118+ ServerWritableBuffer < ResponseType > & { end : ( metadata ?: Metadata ) => void } ;
107119
108120export class ServerUnaryCallImpl < RequestType , ResponseType >
109121 extends EventEmitter
You can’t perform that action at this time.
0 commit comments