2

We are following the polkadot{.js} docs on TypeScript user generated for Chain modules. We are trying to get our custom chain module types into Typescript. We can generate fine however the generated files wont compile. They have hundreds of errors. like:

Cannot find name 'SpRuntimeDispatchError'.

and

 Cannot find name 'SpWeightsWeightV2Weight'.

has anyone done this. the docs seam like they are out of date and the example is over a year old.

1 Answer 1

0

Fixed.

I was importing the default type augmentations with import '@polkadot/api-augment'

Removed that and it works fine. Types show up in TS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.