@@ -38,6 +38,17 @@ export interface Call extends EventEmitter {
38
38
event : 'metadata' , listener : ( metadata : Metadata ) => void ) : this;
39
39
removeListener ( event : 'metadata' , listener : ( metadata : Metadata ) => void ) :
40
40
this;
41
+
42
+ addListener ( event : 'status' , listener : ( status : StatusObject ) => void ) : this;
43
+ emit ( event : 'status' , status : StatusObject ) : boolean ;
44
+ on ( event : 'status' , listener : ( status : StatusObject ) => void ) : this;
45
+ once ( event : 'status' , listener : ( status : StatusObject ) => void ) : this;
46
+ prependListener ( event : 'status' , listener : ( status : StatusObject ) => void ) :
47
+ this;
48
+ prependOnceListener (
49
+ event : 'status' , listener : ( status : StatusObject ) => void ) : this;
50
+ removeListener ( event : 'status' , listener : ( status : StatusObject ) => void ) :
51
+ this;
41
52
}
42
53
43
54
export interface ClientUnaryCall extends Call { }
@@ -48,6 +59,9 @@ export class ClientUnaryCallImpl extends EventEmitter implements Call {
48
59
call . on ( 'metadata' , ( metadata : Metadata ) => {
49
60
this . emit ( 'metadata' , metadata ) ;
50
61
} ) ;
62
+ call . on ( 'status' , ( status : StatusObject ) => {
63
+ this . emit ( 'status' , status ) ;
64
+ } ) ;
51
65
}
52
66
53
67
cancel ( ) : void {
@@ -70,17 +84,6 @@ export interface ClientReadableStream<ResponseType> extends
70
84
prependListener ( event : string , listener : Function ) : this;
71
85
prependOnceListener ( event : string , listener : Function ) : this;
72
86
removeListener ( event : string , listener : Function ) : this;
73
-
74
- addListener ( event : 'status' , listener : ( status : StatusObject ) => void ) : this;
75
- emit ( event : 'status' , status : StatusObject ) : boolean ;
76
- on ( event : 'status' , listener : ( status : StatusObject ) => void ) : this;
77
- once ( event : 'status' , listener : ( status : StatusObject ) => void ) : this;
78
- prependListener ( event : 'status' , listener : ( status : StatusObject ) => void ) :
79
- this;
80
- prependOnceListener (
81
- event : 'status' , listener : ( status : StatusObject ) => void ) : this;
82
- removeListener ( event : 'status' , listener : ( status : StatusObject ) => void ) :
83
- this;
84
87
}
85
88
86
89
export interface ClientWritableStream < RequestType > extends
0 commit comments