diff --git a/integration/grpc-web-no-streaming-observable/example.ts b/integration/grpc-web-no-streaming-observable/example.ts index 3c2bdc5f2..ea9642f05 100644 --- a/integration/grpc-web-no-streaming-observable/example.ts +++ b/integration/grpc-web-no-streaming-observable/example.ts @@ -429,7 +429,7 @@ function isSet(value: any): boolean { return value !== null && value !== undefined; } -export class GrpcWebError extends Error { +export class GrpcWebError extends globalThis.Error { constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) { super(message); } diff --git a/integration/grpc-web-no-streaming/example.ts b/integration/grpc-web-no-streaming/example.ts index bbf9663cd..834263b73 100644 --- a/integration/grpc-web-no-streaming/example.ts +++ b/integration/grpc-web-no-streaming/example.ts @@ -426,7 +426,7 @@ function isSet(value: any): boolean { return value !== null && value !== undefined; } -export class GrpcWebError extends Error { +export class GrpcWebError extends globalThis.Error { constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) { super(message); } diff --git a/integration/grpc-web/example.ts b/integration/grpc-web/example.ts index 52a451c85..75c03351e 100644 --- a/integration/grpc-web/example.ts +++ b/integration/grpc-web/example.ts @@ -903,7 +903,7 @@ function isSet(value: any): boolean { return value !== null && value !== undefined; } -export class GrpcWebError extends Error { +export class GrpcWebError extends globalThis.Error { constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) { super(message); } diff --git a/src/main.ts b/src/main.ts index d083f73cf..cc4863be7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -702,7 +702,7 @@ function makeGrpcWebErrorClass() { const GrpcWebError = conditionalOutput( "GrpcWebError", code` - export class GrpcWebError extends Error { + export class GrpcWebError extends globalThis.Error { constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) { super(message); }