From b292946de7a4d558de4c8156b9680c5b20dd2429 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Tue, 9 Apr 2024 14:45:35 -0700 Subject: [PATCH] proto-loader: Avoid generating duplicate method declarations in some cases --- packages/proto-loader/bin/proto-loader-gen-types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/proto-loader/bin/proto-loader-gen-types.ts b/packages/proto-loader/bin/proto-loader-gen-types.ts index 6db109904..b586983d9 100644 --- a/packages/proto-loader/bin/proto-loader-gen-types.ts +++ b/packages/proto-loader/bin/proto-loader-gen-types.ts @@ -555,7 +555,7 @@ function generateServiceClientInterface(formatter: TextFormatter, serviceType: P formatter.indent(); for (const methodName of Object.keys(serviceType.methods).sort()) { const method = serviceType.methods[methodName]; - for (const name of [methodName, camelCase(methodName)]) { + for (const name of new Set([methodName, camelCase(methodName)])) { if (CLIENT_RESERVED_METHOD_NAMES.has(name)) { continue; }