You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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".
The text was updated successfully, but these errors were encountered:
Lots of comments here - polkadot-js/api#5540
There are basically 3 options -
node --loader ts-node/esm node_modules/.bin/polkadot-types-from-defs --package ...
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 yourpackage.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".The text was updated successfully, but these errors were encountered: