Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated types in TypesReturns and TypesArguments #128

Open
goastler opened this issue Sep 18, 2023 · 0 comments
Open

Duplicated types in TypesReturns and TypesArguments #128

goastler opened this issue Sep 18, 2023 · 0 comments

Comments

@goastler
Copy link

Typechain seems to output duplicate types under the returns and arguments directories. E.g. I have a small contract with 3 methods which generates exactly the same file in TypeArguments and TypeReturns:

types-arguments

export enum LangError {
    couldNotReadInput = 'CouldNotReadInput',
}

export type AccountId = string | number[]

types-returns

export enum LangError {
    couldNotReadInput = 'CouldNotReadInput',
}

export type AccountId = string | number[]

Why are the type-arguments and types-returns separate things and could they be merged? It's very unclear whether I should be using types from the arguments or returns side of things. Further, the duplication makes exporting to other packages annoying due to naming clashes. E.g.

index.ts

export * from './types-arguments'
export * from './types-returns'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant