Skip to content

Commit

Permalink
ts-web/core: switch away from newly broken getName
Browse files Browse the repository at this point in the history
This reverts commit 6065330.
  • Loading branch information
pro-wh committed Sep 27, 2022
1 parent 8d00ced commit d2ba907
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client-sdk/ts-web/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,9 @@ export class GRPCWrapper {
desc: grpcWeb.MethodDescriptor<REQ, RESP>,
request: REQ,
): Promise<RESP> {
const method = this.base + desc.getName();
// @ts-expect-error missing declaration
const name = desc.name;
const method = this.base + name;
// Some browsers with enormous market share aren't able to preserve the stack between here
// and our `.catch` callback below. Save a copy explicitly.
const invocationStack = new Error().stack;
Expand Down Expand Up @@ -642,8 +644,10 @@ End of invocation stack`;
desc: grpcWeb.MethodDescriptor<REQ, RESP>,
request: REQ,
): grpcWeb.ClientReadableStream<RESP> {
// @ts-expect-error missing declaration
const name = desc.name;
return this.client.serverStreaming(
this.base + desc.getName(),
this.base + name,
request,
// @ts-expect-error metadata nullability not modeled
null,
Expand Down

0 comments on commit d2ba907

Please sign in to comment.