Add missing properties to ServerDuplexStream

- cancelled: boolean;
- metadata: Metadata;
This commit is contained in:
André Wachter 2017-12-14 11:40:11 +01:00
parent 6d21f12cfe
commit 3692053a4e
1 changed files with 11 additions and 1 deletions

View File

@ -409,6 +409,16 @@ declare module "grpc" {
* with duplex streaming. * with duplex streaming.
*/ */
export class ServerDuplexStream<RequestType, ResponseType> extends Duplex { export class ServerDuplexStream<RequestType, ResponseType> extends Duplex {
/**
* Indicates if the call has been cancelled
*/
cancelled: boolean;
/**
* The request metadata from the client
*/
metadata: Metadata;
private constructor(); private constructor();
/** /**
@ -1220,7 +1230,7 @@ declare module "grpc" {
* @param value The response value, if the call succeeded * @param value The response value, if the call succeeded
*/ */
export type requestCallback<ResponseType> = export type requestCallback<ResponseType> =
(error: ServiceError | null, value: ResponseType | null) => void; (error: ServiceError | null, value: ResponseType | undefined) => void;
/** /**
* Return the underlying channel object for the specified client * Return the underlying channel object for the specified client