Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Struct interfaces from typechain #453

@marcusnewton

Description

@marcusnewton

It's difficult to bump typechain since we depend on importing XStruct types to help us type check our config structs in our tests. The latest versions of typechain now wrap properties with PromiseOrValue<T> which is frustrating as we would need to await every usage of those properties in our tests, even though there's nothing to await.

The other option is somehow extracting only the non-array properties from union types that typechain generates, however I'm not sure of how to make TypeScript let us do that.

  export type FooStructOutput = [BigNumber, BigNumber] & {
    a: BigNumber;
    b: BigNumber;
  };

Ideally, however, typechain would generate actual interfaces we can use that simply contain struct properties without being wrapped by PromiseOrValue<T>. Will seek to get this resolved upstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions