Skip to content

Use return instead of param for return parameter documentation#241

Merged
PaulRBerg merged 1 commit intoPaulRBerg:mainfrom
ericglau:returndocs
Jul 22, 2024
Merged

Use return instead of param for return parameter documentation#241
PaulRBerg merged 1 commit intoPaulRBerg:mainfrom
ericglau:returndocs

Conversation

@ericglau
Copy link
Copy Markdown
Contributor

Some functions document the return parameter using the @param NatSpec tag, and the Solidity compiler does not fail in these cases. However, since these are referring to return parameters instead of function parameters, it would be more correct to document them as @return instead.

@PaulRBerg
Copy link
Copy Markdown
Owner

Good catch! Thanks for the PR.

Do you need a new version shipped to the npm registry or can you install from GitHub directly?

@PaulRBerg PaulRBerg added the type: docs Changes to documentation. label Jul 22, 2024
Copy link
Copy Markdown
Owner

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you

@ericglau
Copy link
Copy Markdown
Contributor Author

Thanks @PaulRBerg. I don't need a new version, this is just a suggested improvement for the NatSpec tags.

@PaulRBerg PaulRBerg merged commit 7fe04e7 into PaulRBerg:main Jul 22, 2024
@ericglau ericglau deleted the returndocs branch July 22, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: docs Changes to documentation.

2 participants