Skip to content

Why commit typechain types? #96

Answered by PaulRBerg
sebastiantf asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @sebastiantf, the rationale is that I want to nudge my template users to ship the types as part of the publicly distributed npm package. For instance, see the published types of the @hifi/amm package.

There are lots of benefits to having the types as part of the npm package - the main one being that your package users would enjoy type safety when working with your smart contracts.

That comes at the cost of having to somehow track the types over time, and committing them in version control is the best way to do that. I know it's a chore to add many additional lines in .gitignore, but there's a lot of third-party contracts that must be excluded from both git and npm, and I know no bette…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@sebastiantf
Comment options

@PaulRBerg
Comment options

@sebastiantf
Comment options

@PaulRBerg
Comment options

@sebastiantf
Comment options

Answer selected by sebastiantf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants