aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-doc/src
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-09-18 05:27:33 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-09-18 07:31:32 +0800
commit9201273939598a13ed00084acdb384403c36fcc4 (patch)
tree983990d2f71519f7a332f9e0199f7f40bee8bdd8 /packages/sol-doc/src
parent5b07669bd0e128a92c8a71d797ac95d77337209b (diff)
downloaddexon-sol-tools-9201273939598a13ed00084acdb384403c36fcc4.tar
dexon-sol-tools-9201273939598a13ed00084acdb384403c36fcc4.tar.gz
dexon-sol-tools-9201273939598a13ed00084acdb384403c36fcc4.tar.bz2
dexon-sol-tools-9201273939598a13ed00084acdb384403c36fcc4.tar.lz
dexon-sol-tools-9201273939598a13ed00084acdb384403c36fcc4.tar.xz
dexon-sol-tools-9201273939598a13ed00084acdb384403c36fcc4.tar.zst
dexon-sol-tools-9201273939598a13ed00084acdb384403c36fcc4.zip
add and test support for return comment
Diffstat (limited to 'packages/sol-doc/src')
-rw-r--r--packages/sol-doc/src/solidity_doc_generator.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts
index 3501e9a52..e0dcb692a 100644
--- a/packages/sol-doc/src/solidity_doc_generator.ts
+++ b/packages/sol-doc/src/solidity_doc_generator.ts
@@ -176,6 +176,11 @@ function _genMethodDoc(
? { name: '', typeDocType: TypeDocTypes.Intrinsic }
: _genMethodReturnTypeDoc(abiDefinition.outputs, methodSignature, devdocIfExists);
+ const returnComment =
+ _.isUndefined(devdocIfExists) || _.isUndefined(devdocIfExists.methods[methodSignature])
+ ? undefined
+ : devdocIfExists.methods[methodSignature].return;
+
const isConstant = abiDefinition.type === 'fallback' ? true : abiDefinition.constant;
// TODO: determine whether fallback functions are always constant, as coded just above
@@ -185,6 +190,7 @@ function _genMethodDoc(
callPath: '', // TODO: wtf is this?
parameters,
returnType,
+ returnComment,
isConstant,
isPayable: abiDefinition.payable,
comment,