export default {
types: {
VCRequested: {
xxx: "xxx",
assertion: "Assertion",
},
Assertion: {
xxxx: "xxx"
}
}
}
As shown in the above code, Assertion is my custom type, but there is a CorePrimitiveAssertion type within metadata that is identical to Assertion. I want to directly replace it with CorePrimitiveAssertion, but when generating types, I get an error:
build/interfaces/vc/types.ts:266:25 - error TS2304: Cannot find name 'CorePrimitiveAssertion'.
266 readonly assertion: CorePrimitiveAssertion;
~~~~~~~~~~~~~~~~~~~~~~
It seems that CorePrimitiveAssertion is not automatically imported into the generated types.If I manually import the following code in this file, it all works:
import type { CorePrimitivesAssertion } from '@polkadot/types/lookup';
All other types work fine. I just want to replace an existing type in metadata within a custom type. Is this achievable?
Version: "@polkadot/api": "^10.9.1"