mirror of https://github.com/grpc/grpc-web.git
Expose getName() in MethodDescriptor and fix TS definitions. (#1289)
This commit is contained in:
parent
ac17547d78
commit
4974a7b5a9
|
@ -74,6 +74,7 @@ const MethodDescriptor = class {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @override
|
* @override
|
||||||
|
* @export
|
||||||
*/
|
*/
|
||||||
getName() {
|
getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
|
|
|
@ -32,3 +32,6 @@ module.UnaryResponse.prototype.getResponseMessage = function() {};
|
||||||
module.UnaryResponse.prototype.getMetadata = function() {};
|
module.UnaryResponse.prototype.getMetadata = function() {};
|
||||||
module.UnaryResponse.prototype.getMethodDescriptor = function() {};
|
module.UnaryResponse.prototype.getMethodDescriptor = function() {};
|
||||||
module.UnaryResponse.prototype.getStatus = function() {};
|
module.UnaryResponse.prototype.getStatus = function() {};
|
||||||
|
|
||||||
|
module.MethodDescriptor = function() {};
|
||||||
|
module.MethodDescriptor.getName = function() {};
|
||||||
|
|
|
@ -75,18 +75,7 @@ declare module "grpc-web" {
|
||||||
responseType: new (...args: unknown[]) => RESP,
|
responseType: new (...args: unknown[]) => RESP,
|
||||||
requestSerializeFn: any,
|
requestSerializeFn: any,
|
||||||
responseDeserializeFn: any);
|
responseDeserializeFn: any);
|
||||||
createRequest(requestMessage: REQ,
|
|
||||||
metadata?: Metadata,
|
|
||||||
callOptions?: CallOptions): Request<REQ, RESP>;
|
|
||||||
createUnaryResponse(responseMessage: RESP,
|
|
||||||
metadata?: Metadata,
|
|
||||||
status?: Status): UnaryResponse<REQ, RESP>;
|
|
||||||
getName(): string;
|
getName(): string;
|
||||||
getMethodType(): string;
|
|
||||||
getRequestMessageCtor(): new (...args: unknown[]) => REQ;
|
|
||||||
getResponseMessageCtor(): new (...args: unknown[]) => RESP;
|
|
||||||
getRequestSerializeFn(): any;
|
|
||||||
getResponseDeserializeFn(): any;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Request<REQ, RESP> {
|
export class Request<REQ, RESP> {
|
||||||
|
|
Loading…
Reference in New Issue