From 787327ac5ee15035a80cd8116d1372821fffa750 Mon Sep 17 00:00:00 2001 From: christians Date: Mon, 22 Nov 2021 16:53:21 +0100 Subject: [PATCH] revert wrong changes from 63fe421b7972ace12272e91a596021fe3037f84c (replaced too many Long.toString with Long.toValue) --- .../simple-long/google/protobuf/wrappers.ts | 4 ++-- integration/simple-long/simple.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/integration/simple-long/google/protobuf/wrappers.ts b/integration/simple-long/google/protobuf/wrappers.ts index 49fddcf5d..26ad3cd97 100644 --- a/integration/simple-long/google/protobuf/wrappers.ts +++ b/integration/simple-long/google/protobuf/wrappers.ts @@ -218,7 +218,7 @@ export const Int64Value = { fromJSON(object: any): Int64Value { const message = { ...baseInt64Value } as Int64Value; - message.value = object.value !== undefined && object.value !== null ? Long.fromValue(object.value) : Long.ZERO; + message.value = object.value !== undefined && object.value !== null ? Long.fromString(object.value) : Long.ZERO; return message; }, @@ -265,7 +265,7 @@ export const UInt64Value = { fromJSON(object: any): UInt64Value { const message = { ...baseUInt64Value } as UInt64Value; - message.value = object.value !== undefined && object.value !== null ? Long.fromValue(object.value) : Long.UZERO; + message.value = object.value !== undefined && object.value !== null ? Long.fromString(object.value) : Long.UZERO; return message; }, diff --git a/integration/simple-long/simple.ts b/integration/simple-long/simple.ts index 3467cc26b..edbc8b312 100644 --- a/integration/simple-long/simple.ts +++ b/integration/simple-long/simple.ts @@ -434,7 +434,7 @@ export const SimpleWithMap_LongLookupEntry = { fromJSON(object: any): SimpleWithMap_LongLookupEntry { const message = { ...baseSimpleWithMap_LongLookupEntry } as SimpleWithMap_LongLookupEntry; message.key = object.key !== undefined && object.key !== null ? String(object.key) : ''; - message.value = object.value !== undefined && object.value !== null ? Long.fromValue(object.value) : Long.ZERO; + message.value = object.value !== undefined && object.value !== null ? Long.fromString(object.value) : Long.ZERO; return message; }, @@ -582,19 +582,19 @@ export const Numbers = { message.double = object.double !== undefined && object.double !== null ? Number(object.double) : 0; message.float = object.float !== undefined && object.float !== null ? Number(object.float) : 0; message.int32 = object.int32 !== undefined && object.int32 !== null ? Number(object.int32) : 0; - message.int64 = object.int64 !== undefined && object.int64 !== null ? Long.fromValue(object.int64) : Long.ZERO; + message.int64 = object.int64 !== undefined && object.int64 !== null ? Long.fromString(object.int64) : Long.ZERO; message.uint32 = object.uint32 !== undefined && object.uint32 !== null ? Number(object.uint32) : 0; message.uint64 = - object.uint64 !== undefined && object.uint64 !== null ? Long.fromValue(object.uint64) : Long.UZERO; + object.uint64 !== undefined && object.uint64 !== null ? Long.fromString(object.uint64) : Long.UZERO; message.sint32 = object.sint32 !== undefined && object.sint32 !== null ? Number(object.sint32) : 0; - message.sint64 = object.sint64 !== undefined && object.sint64 !== null ? Long.fromValue(object.sint64) : Long.ZERO; + message.sint64 = object.sint64 !== undefined && object.sint64 !== null ? Long.fromString(object.sint64) : Long.ZERO; message.fixed32 = object.fixed32 !== undefined && object.fixed32 !== null ? Number(object.fixed32) : 0; message.fixed64 = - object.fixed64 !== undefined && object.fixed64 !== null ? Long.fromValue(object.fixed64) : Long.UZERO; + object.fixed64 !== undefined && object.fixed64 !== null ? Long.fromString(object.fixed64) : Long.UZERO; message.sfixed32 = object.sfixed32 !== undefined && object.sfixed32 !== null ? Number(object.sfixed32) : 0; message.sfixed64 = - object.sfixed64 !== undefined && object.sfixed64 !== null ? Long.fromValue(object.sfixed64) : Long.ZERO; - message.manyUint64 = (object.manyUint64 ?? []).map((e: any) => Long.fromValue(e)); + object.sfixed64 !== undefined && object.sfixed64 !== null ? Long.fromString(object.sfixed64) : Long.ZERO; + message.manyUint64 = (object.manyUint64 ?? []).map((e: any) => Long.fromString(e)); return message; },