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
|
* @override
|
||||||
|
* @export
|
||||||
*/
|
*/
|
||||||
getName() {
|
getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
|
|
@ -81,6 +82,7 @@ const MethodDescriptor = class {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @override
|
* @override
|
||||||
|
* @export
|
||||||
*/
|
*/
|
||||||
getMethodType() {
|
getMethodType() {
|
||||||
return this.methodType;
|
return this.methodType;
|
||||||
|
|
@ -88,6 +90,7 @@ const MethodDescriptor = class {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @override
|
* @override
|
||||||
|
* @export
|
||||||
* @return {function(new: RESPONSE, ...)}
|
* @return {function(new: RESPONSE, ...)}
|
||||||
*/
|
*/
|
||||||
getResponseMessageCtor() {
|
getResponseMessageCtor() {
|
||||||
|
|
@ -96,18 +99,25 @@ const MethodDescriptor = class {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @override
|
* @override
|
||||||
|
* @export
|
||||||
* @return {function(new: REQUEST, ...)}
|
* @return {function(new: REQUEST, ...)}
|
||||||
*/
|
*/
|
||||||
getRequestMessageCtor() {
|
getRequestMessageCtor() {
|
||||||
return this.requestType;
|
return this.requestType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @override */
|
/**
|
||||||
|
* @override
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
getResponseDeserializeFn() {
|
getResponseDeserializeFn() {
|
||||||
return this.responseDeserializeFn;
|
return this.responseDeserializeFn;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @override */
|
/**
|
||||||
|
* @override
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
getRequestSerializeFn() {
|
getRequestSerializeFn() {
|
||||||
return this.requestSerializeFn;
|
return this.requestSerializeFn;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,3 +32,11 @@ 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() {};
|
||||||
|
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