OpenZeppelin / solidity-docgen

Documentation generator for Solidity projects
MIT License
452 stars 118 forks source link

Add returnParameters in SourceContractItem alongside with parameters #300

Open Pzixel opened 3 years ago

Pzixel commented 3 years ago

Current version of solidity-docgen exposes ast.parameters as args but doesn't expose return values. It's important because natspec.returns only shows return args that were documented which isn't always the case.

It may be worthwhile to expose this.astNode itself so users can always access what they need from solc output.

frangio commented 3 years ago

Exposing return parameters is a good idea.

astNode is a private TypeScript variable but you should still be able to access it in your Handlebars templates. Can you try that and let me know if it works?

Pzixel commented 3 years ago

I'l give it a shot. Thanks for insight, in my actually work