mirror of https://github.com/grpc/grpc-web.git
Expose MethodDescriptor's public methods (#1160)
Co-authored-by: Eryu Xia <eryu@google.com>
This commit is contained in:
parent
cc1a135855
commit
97baed4dbe
|
|
@ -74,6 +74,7 @@ const MethodDescriptor = class {
|
|||
|
||||
/**
|
||||
* @override
|
||||
* @export
|
||||
*/
|
||||
getName() {
|
||||
return this.name;
|
||||
|
|
@ -81,6 +82,7 @@ const MethodDescriptor = class {
|
|||
|
||||
/**
|
||||
* @override
|
||||
* @export
|
||||
*/
|
||||
getMethodType() {
|
||||
return this.methodType;
|
||||
|
|
@ -88,6 +90,7 @@ const MethodDescriptor = class {
|
|||
|
||||
/**
|
||||
* @override
|
||||
* @export
|
||||
* @return {function(new: RESPONSE, ...)}
|
||||
*/
|
||||
getResponseMessageCtor() {
|
||||
|
|
@ -96,18 +99,25 @@ const MethodDescriptor = class {
|
|||
|
||||
/**
|
||||
* @override
|
||||
* @export
|
||||
* @return {function(new: REQUEST, ...)}
|
||||
*/
|
||||
getRequestMessageCtor() {
|
||||
return this.requestType;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
/**
|
||||
* @override
|
||||
* @export
|
||||
*/
|
||||
getResponseDeserializeFn() {
|
||||
return this.responseDeserializeFn;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
/**
|
||||
* @override
|
||||
* @export
|
||||
*/
|
||||
getRequestSerializeFn() {
|
||||
return this.requestSerializeFn;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,3 +32,11 @@ module.UnaryResponse.prototype.getResponseMessage = function() {};
|
|||
module.UnaryResponse.prototype.getMetadata = function() {};
|
||||
module.UnaryResponse.prototype.getMethodDescriptor = function() {};
|
||||
module.UnaryResponse.prototype.getStatus = function() {};
|
||||
|
||||
module.MethodDescriptor = function() {};
|
||||
module.MethodDescriptor.getName = function() {};
|
||||
module.MethodDescriptor.getMethodType = function() {};
|
||||
module.MethodDescriptor.getResponseMessageCtor = function() {};
|
||||
module.MethodDescriptor.getRequestMessageCtor = function() {};
|
||||
module.MethodDescriptor.getResponseDeserializeFn = function() {};
|
||||
module.MethodDescriptor.getRequestSerializeFn = function() {};
|
||||
|
|
|
|||
Loading…
Reference in New Issue