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

Adjust docs for typegen for API 10.1.3+ #419

Open
jacogr opened this issue Mar 16, 2023 · 0 comments
Open

Adjust docs for typegen for API 10.1.3+ #419

jacogr opened this issue Mar 16, 2023 · 0 comments

Comments

@jacogr
Copy link
Member

jacogr commented Mar 16, 2023

Lots of comments here - polkadot-js/api#5540

There are basically 3 options -

  1. node --loader ts-node/esm node_modules/.bin/polkadot-types-from-defs --package ...
  2. ts-node --esm --skip-project node_modules/.bin/polkadot-types-from-defs --package ... (Some caveats with resolutions)

For both the above you would need "type": "module" added to your package.json

There is also a (distant) 3rd option, using the @polkadot/dev-ts loader - would probably focus on the options above, since this one "works for polkadot-js", but not sure if it doesn't work in specific repos we want to deal with support (especially those with no PRs to close holes). Having said that, it has been tested as a drop-in replacement for some 3rd part typegen repos and works there. This one doesn't need a type: module changes in the package, it always "just does ESM".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant