TypeChain
TypeChain copied to clipboard
Type is declared but never used.ts (6196)
I am using the abi from an open source contract and when I create types with typechain it has a line import type { PayableTransactionObject }
This gives me the error 'PayableTransactionObject' is declared but never used.ts (6196).
How can I avoid this without making my tsconfig less strict?
At the moment I am just deleting the line which makes everything work. However this means I need to track the file in git which goes against the recommendation of making typechain part of the build process.
Can you share ABI and target name that generated such error? We are trying to avoid generation code that throws such warnings.
This is the ABI File BridgeToken.txt
This is my tsconfig tsconfig.txt
The command I ran is:
npx typechain --target=web3-v1 'contracts/*.json'
Note: I had to change the file endings of the files from .json to .txt to upload them to github as github prevented me from uploading files with .json file ending.
Hi @krzkaczor have you had a chance to look in to this?