Add support of AnyStruct type as arguments
Support for AnyStruct as arg in transactions and scripts
Hey Team, I am working on flow testcases in js using flow-js-testing library. I am trying to pass AnyStruct as an argument for my transactions and scripts but I am unable to pass it and getting some errors.
I have passed AnyStruct as dictionary as:
transaction(data:{String:AnyStruct})
than I got following error:

Also I have passed AnyStruct as an argument directly as:
transaction(data:AnyStruct)
than I got this error:

After debugging the my code and node_modules libraries, I got that flow-js-testing is using flow-cadut.
flow-cadut has a resolveArguments method at args.js file which resolve and validate arguments, but it doesn't seem to support AnyStruct for now.
Issue To Be Solved
To solve this issue, we need to support AnyStruct as an argument of transaction and script.
Suggest A Solution
In type-checker.js we can add a new type-checker method for AnyStruct than we can use that method in args.js and relevant files to support AnyStruct. It is not complete solution but we can work on that and add support to AnyStruct as an argument.
Let me know if it is supported already or work in progress to support it.
Thanks
Responded on the associated FCL Issue: https://github.com/onflow/fcl-js/issues/1237#issuecomment-1150238091