fix: consistent protos

This commit is contained in:
TrèsAbhi committed 2026-03-31 13:35:47 -05:00
1 parent ae793c1c28
commit bdea9fdab3
29 files changed
+2014 -2363

No files matched your search

+8 -16
View File
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.2.2
// protoc-gen-ts_proto v2.11.2
// protoc v5.28.2
// source: packages/core/src/protos/popular_tanks.proto
// source: popular_tanks.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -19,7 +19,7 @@ export interface PopularTank {
views: number;
}
export function createBasePopularTanks(): PopularTanks {
function createBasePopularTanks(): PopularTanks {
return { tanks: [] };
}
@@ -33,7 +33,7 @@ export const PopularTanks: MessageFns<PopularTanks> = {
decode(input: BinaryReader | Uint8Array, length?: number): PopularTanks {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBasePopularTanks();
while (reader.pos < end) {
const tag = reader.uint32();
@@ -79,7 +79,7 @@ export const PopularTanks: MessageFns<PopularTanks> = {
},
};
export function createBasePopularTank(): PopularTank {
function createBasePopularTank(): PopularTank {
return { id: 0, views: 0 };
}
@@ -96,7 +96,7 @@ export const PopularTank: MessageFns<PopularTank> = {
decode(input: BinaryReader | Uint8Array, length?: number): PopularTank {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBasePopularTank();
while (reader.pos < end) {
const tag = reader.uint32();
@@ -128,8 +128,8 @@ export const PopularTank: MessageFns<PopularTank> = {
fromJSON(object: any): PopularTank {
return {
id: globalThis.Number(assertSet("PopularTank.id", object.id)),
views: globalThis.Number(assertSet("PopularTank.views", object.views)),
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
views: isSet(object.views) ? globalThis.Number(object.views) : 0,
};
},
@@ -172,14 +172,6 @@ function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
function assertSet<T>(field: string, value: T | undefined): T {
if (!isSet(value)) {
throw new TypeError(`Required field ${field} is not set`);
}
return value as T;
}
export interface MessageFns<T> {
encode(message: T, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): T;