nice-grpc-error-details
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -62,20 +62,5 @@ "use strict"; | ||
typeRegistry_1.messageTypeRegistry.set(exports.Duration.$type, exports.Duration); | ||
const tsProtoGlobalThis = (() => { | ||
if (typeof globalThis !== "undefined") { | ||
return globalThis; | ||
} | ||
if (typeof self !== "undefined") { | ||
return self; | ||
} | ||
if (typeof window !== "undefined") { | ||
return window; | ||
} | ||
if (typeof global !== "undefined") { | ||
return global; | ||
} | ||
throw "Unable to locate global object"; | ||
})(); | ||
function longToNumber(long) { | ||
if (long.gt(Number.MAX_SAFE_INTEGER)) { | ||
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); | ||
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) { | ||
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); | ||
} | ||
@@ -82,0 +67,0 @@ return long.toNumber(); |
{ | ||
"name": "nice-grpc-error-details", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "gRPC rich error model implementation for nice-grpc", | ||
@@ -28,3 +28,3 @@ "repository": "deeplay-io/nice-grpc", | ||
"grpc-tools": "^1.10.0", | ||
"nice-grpc": "^2.1.5", | ||
"nice-grpc": "^2.1.6", | ||
"ts-proto": "^1.112.0" | ||
@@ -37,3 +37,3 @@ }, | ||
}, | ||
"gitHead": "ccf77e29227a5d17272ea5858c80324e9fe793bc" | ||
"gitHead": "dcb7b98bb34e99d16e276e806fdccad60e6072ab" | ||
} |
@@ -147,21 +147,2 @@ /* eslint-disable */ | ||
declare const self: any | undefined; | ||
declare const window: any | undefined; | ||
declare const global: any | undefined; | ||
const tsProtoGlobalThis: any = (() => { | ||
if (typeof globalThis !== "undefined") { | ||
return globalThis; | ||
} | ||
if (typeof self !== "undefined") { | ||
return self; | ||
} | ||
if (typeof window !== "undefined") { | ||
return window; | ||
} | ||
if (typeof global !== "undefined") { | ||
return global; | ||
} | ||
throw "Unable to locate global object"; | ||
})(); | ||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; | ||
@@ -175,4 +156,4 @@ | ||
function longToNumber(long: Long): number { | ||
if (long.gt(Number.MAX_SAFE_INTEGER)) { | ||
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); | ||
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) { | ||
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); | ||
} | ||
@@ -179,0 +160,0 @@ return long.toNumber(); |
Sorry, the diff of this file is not supported yet
175983
3509