You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps we should add an optional field in codegen.js to prepend an "exec_" or "query_" to associated methods?
packages-ts/gauntlet-cosmos-contracts/codegen/CW3FlexMultisig.client.ts:179:18 - error TS2430: Interface 'CW3FlexMultisigInterface' incorrectly extends interface 'CW3FlexMultisigReadOnlyInterface'.
Types of property 'vote' are incompatible.
Type '({ proposalId, vote }: { proposalId: number; vote: Vote; }, fee?: number | StdFee | "auto" | undefined, memo?: string | undefined, _funds?: Coin[] | undefined) => Promise<ExecuteResult>' is not assignable to type '({ proposalId, voter }: { proposalId: number; voter: string; }) => Promise<VoteResponse>'.
Types of parameters '__0' and '__0' are incompatible.
Property 'vote' is missing in type '{ proposalId: number; voter: string; }' but required in type '{ proposalId: number; vote: Vote; }'.
179 export interface CW3FlexMultisigInterface extends CW3FlexMultisigReadOnlyInterface {
~~~~~~~~~~~~~~~~~~~~~~~~
packages-ts/gauntlet-cosmos-contracts/codegen/CW3FlexMultisig.client.ts:198:5
198 vote: Vote;
~~~~
'vote' is declared here.
packages-ts/gauntlet-cosmos-contracts/codegen/CW3FlexMultisig.client.ts:253:3 - error TS2416: Property 'vote' in type 'CW3FlexMultisigClient' is not assignable to the same property in base type 'CW3FlexMultisigQueryClient'.
Type '({ proposalId, vote }: { proposalId: number; vote: Vote; }, fee?: number | StdFee | "auto", memo?: string | undefined, _funds?: Coin[] | undefined) => Promise<ExecuteResult>' is not assignable to type '({ proposalId, voter }: { proposalId: number; voter: string; }) => Promise<VoteResponse>'.
Types of parameters '__0' and '__0' are incompatible.
Property 'vote' is missing in type '{ proposalId: number; voter: string; }' but required in type '{ proposalId: number; vote: Vote; }'.
253 vote = async ({
~~~~
packages-ts/gauntlet-cosmos-contracts/codegen/CW3FlexMultisig.client.ts:258:5
258 vote: Vote;
~~~~
'vote' is declared here.
I can open a PR if that sounds good
The text was updated successfully, but these errors were encountered:
Found this when trying to generate types for the cw3-flex-multisig contract:
There is both a "Vote" enum value for the QueryMsg and Execute Msg (https://github.com/CosmWasm/cw-plus/blob/main/contracts/cw3-flex-multisig/src/msg.rs#L32) so when ts-codegen generates the client class, the "vote" execute method it shares the same name as "vote" query method.
Perhaps we should add an optional field in codegen.js to prepend an "exec_" or "query_" to associated methods?
I can open a PR if that sounds good
The text was updated successfully, but these errors were encountered: