From 7d0a84b70113766da0797f809ac159cc3cd65734 Mon Sep 17 00:00:00 2001 From: nabarun Date: Wed, 8 Mar 2023 20:27:04 +0530 Subject: [PATCH] Fix protoc-gen-ts error with updated typescript --- package.json | 2 +- src/proto/cosmos/base/query/v1beta1/pagination.ts | 4 ++-- src/proto/google/protobuf/any.ts | 2 +- src/proto/google/protobuf/descriptor.ts | 2 +- yarn.lock | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 066347b..30ecc1b 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "dotenv": "^16.0.0", "google-protobuf": "^3.21.0", "jest": "29.0.0", - "protoc-gen-ts": "^0.8.5", + "protoc-gen-ts": "^0.8.6-rc1", "ts-jest": "^29.0.2", "typescript": "^4.6.2" }, diff --git a/src/proto/cosmos/base/query/v1beta1/pagination.ts b/src/proto/cosmos/base/query/v1beta1/pagination.ts index e596bd5..b12d805 100644 --- a/src/proto/cosmos/base/query/v1beta1/pagination.ts +++ b/src/proto/cosmos/base/query/v1beta1/pagination.ts @@ -37,7 +37,7 @@ export namespace cosmos.base.query.v1beta1 { } } get key() { - return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array()) as Uint8Array; + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; } set key(value: Uint8Array) { pb_1.Message.setField(this, 1, value); @@ -184,7 +184,7 @@ export namespace cosmos.base.query.v1beta1 { } } get next_key() { - return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array()) as Uint8Array; + return pb_1.Message.getFieldWithDefault(this, 1, new Uint8Array(0)) as Uint8Array; } set next_key(value: Uint8Array) { pb_1.Message.setField(this, 1, value); diff --git a/src/proto/google/protobuf/any.ts b/src/proto/google/protobuf/any.ts index 16c08b5..d00cb78 100644 --- a/src/proto/google/protobuf/any.ts +++ b/src/proto/google/protobuf/any.ts @@ -32,7 +32,7 @@ export namespace google.protobuf { pb_1.Message.setField(this, 1, value); } get value() { - return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array()) as Uint8Array; + return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; } set value(value: Uint8Array) { pb_1.Message.setField(this, 2, value); diff --git a/src/proto/google/protobuf/descriptor.ts b/src/proto/google/protobuf/descriptor.ts index b58970e..f06059d 100644 --- a/src/proto/google/protobuf/descriptor.ts +++ b/src/proto/google/protobuf/descriptor.ts @@ -3604,7 +3604,7 @@ export namespace google.protobuf { return pb_1.Message.getField(this, 6) != null; } get string_value() { - return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array()) as Uint8Array; + return pb_1.Message.getFieldWithDefault(this, 7, new Uint8Array(0)) as Uint8Array; } set string_value(value: Uint8Array) { pb_1.Message.setField(this, 7, value); diff --git a/yarn.lock b/yarn.lock index cf121c4..b04dd1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3086,10 +3086,10 @@ protobufjs@~6.11.2: "@types/node" ">=13.7.0" long "^4.0.0" -protoc-gen-ts@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/protoc-gen-ts/-/protoc-gen-ts-0.8.5.tgz#5c277ff90b6b38f52313b1b0ad69e6c825305b29" - integrity sha512-LHZ+w/+DqmdgnhPtShgqtPtdv+hJ9bAXEIqNU0kkY2bPcCVIEWz5seOv20FCw6gbKorriTGP8xgz2RsIcrRvVw== +protoc-gen-ts@^0.8.6-rc1: + version "0.8.6-rc1" + resolved "https://registry.yarnpkg.com/protoc-gen-ts/-/protoc-gen-ts-0.8.6-rc1.tgz#6c0a247ec4e67bbaf09546263b1ec18b52c2638d" + integrity sha512-UfnuENo5T32nKC/jEEpobDeQQU94xtSe3ku4CH3q2/xGLcZ9KpIsUChdh5PK+Yl5Ed7KemU895ZmqeZex4nB5w== randombytes@^2.0.1, randombytes@^2.1.0: version "2.1.0"