Closed dadamu closed 2 years ago
hi @dadamu are do you happen to have a method of the same name in both your ExecuteMsg
and QueryMsg
?
@pyramation No, they don't have the same name, the example contract is here.
However PoapClient
and PoapQueryClient
has the same name properties generated by ts-codegen, client
and contractAddress
. I added override
manually then solved the issue.
I will look into making an option for this.
In the meantime, it looks like you can also set noImplicitOverride
to false
in your tsconfig.json
tracking here https://github.com/CosmWasm/ts-codegen/pull/79
just create a new option client.noImplicit.noImplicitOverride
you can set to true.
Defaults to false to keep backwards compat for now.
Successfully published:
- @cosmwasm/ts-codegen@0.21.0
- wasm-ast-types@0.15.0
@pyramation Thanks for the help!
The generated client file from json schema from
cw_serde
could not work properly since it misses theoverride
modifier. For instance, the generated Poap.client.ts shows:Then, thhe error shows:
After adding override modifier to PoapClient property can solve the issue, like: