ts-proto 1.136.0 → 1.136.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +5 -5
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -225,7 +225,7 @@ function makeUtils(options) {
|
|
|
225
225
|
...longs,
|
|
226
226
|
...makeComparisonUtils(),
|
|
227
227
|
...makeNiceGrpcServerStreamingMethodResult(),
|
|
228
|
-
...makeGrpcWebErrorClass(),
|
|
228
|
+
...makeGrpcWebErrorClass(bytes),
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
exports.makeUtils = makeUtils;
|
|
@@ -297,11 +297,11 @@ function makeLongUtils(options, bytes) {
|
|
|
297
297
|
return { numberToLong, longToNumber, longToString, Long };
|
|
298
298
|
}
|
|
299
299
|
function makeByteUtils() {
|
|
300
|
-
const globalThis = (0, ts_poet_1.conditionalOutput)("
|
|
300
|
+
const globalThis = (0, ts_poet_1.conditionalOutput)("tsProtoGlobalThis", (0, ts_poet_1.code) `
|
|
301
301
|
declare var self: any | undefined;
|
|
302
302
|
declare var window: any | undefined;
|
|
303
303
|
declare var global: any | undefined;
|
|
304
|
-
var
|
|
304
|
+
var tsProtoGlobalThis: any = (() => {
|
|
305
305
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
306
306
|
if (typeof self !== "undefined") return self;
|
|
307
307
|
if (typeof window !== "undefined") return window;
|
|
@@ -492,9 +492,9 @@ function makeNiceGrpcServerStreamingMethodResult() {
|
|
|
492
492
|
`);
|
|
493
493
|
return { NiceGrpcServerStreamingMethodResult };
|
|
494
494
|
}
|
|
495
|
-
function makeGrpcWebErrorClass() {
|
|
495
|
+
function makeGrpcWebErrorClass(bytes) {
|
|
496
496
|
const GrpcWebError = (0, ts_poet_1.conditionalOutput)("GrpcWebError", (0, ts_poet_1.code) `
|
|
497
|
-
export class GrpcWebError extends globalThis.Error {
|
|
497
|
+
export class GrpcWebError extends ${bytes.globalThis}.Error {
|
|
498
498
|
constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) {
|
|
499
499
|
super(message);
|
|
500
500
|
}
|