dethcrypto / dethcrypto/TypeChain
Generate interfaces for structs alongside existing struct types
Open
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
PR https://github.com/dethcrypto/TypeChain/pull/700 changed how struct types are generated. I've been importing these structs (before the properties were wrapped by `PromiseOrValue`) to help me type check inputs in hardhat tests.
Perhaps alongside the existing struct types you could provide an `interface` type also:
```
export interface Foo {
a: BigNumberish;
b: BigNumberish;
};
export type FooStruct = {
a: PromiseOrValue;
b: PromiseOrValue;
};
export type FooStructOutput = [BigNumber, BigNumber] & {
a: BigNumber;
b: BigNumber;
};
```
Contributor guide
Assessment
This issue has not been assessed yet.