-
Notifications
You must be signed in to change notification settings - Fork 162
config: Enhance CUSTOM_TYPES to take Object too. #357
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
Conversation
809e4fd to
6e2b688
Compare
|
Looks like this has issues with As I am not an expert with TypeScript yet, would like to get advise on how to handle a object in the |
|
Thank you for the PR! As I mentioned in the code comment, I think You might also be interested in #351, as that makes sidecar much more friendly to non polkadot/kusama substrate based chains by pulling in types from |
If a pallet is updating a block with type Json, the Record<string, string> is not going to meet the needs. Enhancing the type of the CUSTOM_TYPES to take json object with `AnyJson` type would fix the issues. Signed-off-by: Amar Tumballi <[email protected]>
6e2b688 to
09585fb
Compare
|
Sure. #351 looks good. Will keep a watch. meantime, did a |
|
Looks like CI is failing because we can't assume |
|
Even that gives error: |
|
I pushed directly to the branch. Not sure why I didn't think of it earlier, but just pulled the exact type polkadot-js uses for the object - |
amarts
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Working for me :-)
If a pallet is updating a block with type Object (Record<string, string>),
there is currently no way to provide a structure/Object interface type.
Enhancing the type of the CUSTOM_TYPES to take json object with
Record<string, string>type would fix the issues.Signed-off-by: Amar Tumballi [email protected]