Skip to content

Commit

Permalink
fix param names and regen
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Oct 25, 2024
1 parent 33f493f commit 987158d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions __fixtures__/v-next/outputhelperfunc/helper-func-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { BinaryReader, BinaryWriter } from "./binary";
import { Rpc } from "./helpers";

export interface QueryBuilderOptions<TReq, TRes> {
encoder: (request: TReq, writer?: BinaryWriter) => BinaryWriter
decoder: (input: BinaryReader | Uint8Array, length?: number) => TRes
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
decode: (input: BinaryReader | Uint8Array, length?: number) => TRes
service: string,
method: string,
getRpcInstance: () => Rpc | undefined
Expand All @@ -22,9 +22,9 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {

if (!rpc) throw new Error("Query Rpc is not initialized");

const data = opts.encoder(request).finish();
const data = opts.encode(request).finish();
const response = await rpc.request(opts.service, opts.method, data);
return opts.decoder(response);
return opts.decode(response);
};
}

Expand Down
8 changes: 4 additions & 4 deletions __fixtures__/v-next/outputicjs/helper-func-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { BinaryReader, BinaryWriter } from "./binary";
import { Rpc } from "./helpers";

export interface QueryBuilderOptions<TReq, TRes> {
encoder: (request: TReq, writer?: BinaryWriter) => BinaryWriter
decoder: (input: BinaryReader | Uint8Array, length?: number) => TRes
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
decode: (input: BinaryReader | Uint8Array, length?: number) => TRes
service: string,
method: string,
getRpcInstance: () => Rpc | undefined
Expand All @@ -22,9 +22,9 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {

if (!rpc) throw new Error("Query Rpc is not initialized");

const data = opts.encoder(request).finish();
const data = opts.encode(request).finish();
const response = await rpc.request(opts.service, opts.method, data);
return opts.decoder(response);
return opts.decode(response);
};
}

Expand Down
8 changes: 4 additions & 4 deletions packages/telescope/src/helpers/helper-func-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { BinaryReader, BinaryWriter } from "./binary";
import { Rpc } from "./helpers";
export interface QueryBuilderOptions<TReq, TRes> {
encoder: (request: TReq, writer?: BinaryWriter) => BinaryWriter
decoder: (input: BinaryReader | Uint8Array, length?: number) => TRes
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
decode: (input: BinaryReader | Uint8Array, length?: number) => TRes
service: string,
method: string,
getRpcInstance: () => Rpc | undefined
Expand All @@ -19,9 +19,9 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {
if (!rpc) throw new Error("Query Rpc is not initialized");
const data = opts.encoder(request).finish();
const data = opts.encode(request).finish();
const response = await rpc.request(opts.service, opts.method, data);
return opts.decoder(response);
return opts.decode(response);
};
}
Expand Down

0 comments on commit 987158d

Please sign in to comment.