From 5b07669bd0e128a92c8a71d797ac95d77337209b Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Mon, 17 Sep 2018 17:23:55 -0400 Subject: add and test support for fallback functions --- packages/sol-doc/src/solidity_doc_generator.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packages/sol-doc/src') diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts index 513468803..3501e9a52 100644 --- a/packages/sol-doc/src/solidity_doc_generator.ts +++ b/packages/sol-doc/src/solidity_doc_generator.ts @@ -1,6 +1,7 @@ import * as _ from 'lodash'; import { + AbiDefinition, ConstructorAbi, DataItem, DevdocOutput, @@ -100,10 +101,13 @@ function _genDocSection(compiledContract: StandardContractOutput): DocSection { // that's because the type of the events array doesn't have any fields for documentation! break; case 'function': + case 'fallback': docSection.methods.push(_genMethodDoc(abiDefinition, compiledContract.devdoc)); break; default: - throw new Error(`unknown and unsupported AbiDefinition type '${abiDefinition.type}'`); + throw new Error( + `unknown and unsupported AbiDefinition type '${(abiDefinition as AbiDefinition).type}'`, + ); } } -- cgit