From 81ce4c52fff4902e61f72403f3a48276753c23f6 Mon Sep 17 00:00:00 2001 From: Eryu Xia Date: Tue, 1 Feb 2022 01:50:44 +0000 Subject: [PATCH] Revert "Expose MethodDescriptor's public methods (#1160)" (#1199) This reverts commit 97baed4dbe26c2fa3cab4197f444674cc27458df. --- javascript/net/grpc/web/methoddescriptor.js | 14 ++------------ packages/grpc-web/externs.js | 8 -------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/javascript/net/grpc/web/methoddescriptor.js b/javascript/net/grpc/web/methoddescriptor.js index 388fa978..a4ff5996 100644 --- a/javascript/net/grpc/web/methoddescriptor.js +++ b/javascript/net/grpc/web/methoddescriptor.js @@ -74,7 +74,6 @@ const MethodDescriptor = class { /** * @override - * @export */ getName() { return this.name; @@ -82,7 +81,6 @@ const MethodDescriptor = class { /** * @override - * @export */ getMethodType() { return this.methodType; @@ -90,7 +88,6 @@ const MethodDescriptor = class { /** * @override - * @export * @return {function(new: RESPONSE, ...)} */ getResponseMessageCtor() { @@ -99,25 +96,18 @@ const MethodDescriptor = class { /** * @override - * @export * @return {function(new: REQUEST, ...)} */ getRequestMessageCtor() { return this.requestType; } - /** - * @override - * @export - */ + /** @override */ getResponseDeserializeFn() { return this.responseDeserializeFn; } - /** - * @override - * @export - */ + /** @override */ getRequestSerializeFn() { return this.requestSerializeFn; } diff --git a/packages/grpc-web/externs.js b/packages/grpc-web/externs.js index 10c867cf..a762da94 100644 --- a/packages/grpc-web/externs.js +++ b/packages/grpc-web/externs.js @@ -32,11 +32,3 @@ 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() {};