hyperweb-io / hyperweb-io/ts-codegen
Weird type issue
- Dominant language
- TypeScript
- Stars
- 126
- Forks
- 31
- Avg merge
- 19m
- Merged PRs (30d)
- 2
Description
While generating the schema for a query message that returns `Option`, ts-codegen fails with:
```
contracts/cw-vesting/CwVesting.client.ts:25:31 - error TS2552: Cannot find name 'NullableDuration'. Did you mean 'Nullable_Duration'?
25 vestDuration: () => Promise;
~~~~~~~~~~~~~~~~
contracts/cw-vesting/CwVesting.client.ts:81:36 - error TS2552: Cannot find name 'NullableDuration'. Did you mean 'Nullable_Duration'?
81 vestDuration = async (): Promise => {
~~~~~~~~~~~~~~~~
```
It appears that it generates a type `Nullable_Duration` that is correct, and the uses a different one `NullableDuration` as the query return value. [This CI job](https://github.com/DA0-DA0/dao-contracts/actions/runs/4358741481/jobs/7619698495) has a branch on which this fails. You can reproduce the issue by checking out that branch and running ts-codegen with `just gen`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.