diff --git a/packages/grpc-web/index.d.ts b/packages/grpc-web/index.d.ts index bd4a2583..e7612ed9 100644 --- a/packages/grpc-web/index.d.ts +++ b/packages/grpc-web/index.d.ts @@ -84,8 +84,17 @@ declare module "grpc-web" { requestSerializeFn: any, responseDeserializeFn: any); createRequest(requestMessage: REQ, - metadata: Metadata, - callOptions: CallOptions): UnaryResponse; + metadata?: Metadata, + callOptions?: CallOptions): Request; + createUnaryResponse(responseMessage: RESP, + metadata?: Metadata, + status?: Status): UnaryResponse; + getName(): string; + getMethodType(): string; + getResponseMessageCtor(): any; + getRequestMessageCtor(): any; + getResponseDeserializeFn(): any; + getRequestSerializeFn(): any; } export class Request { @@ -144,4 +153,9 @@ declare module "grpc-web" { const UNIMPLEMENTED: number; const UNKNOWN: number; } + + export namespace MethodType { + const UNARY: string; + const SERVER_STREAMING: string; + } }