diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-15 07:34:21 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-15 07:34:21 +0800 |
commit | 04e00e0c2849951b352692a8d8327160dc7475f8 (patch) | |
tree | 989dd5b07f48ae2b1c8c4f1e69523bbba6829881 /packages/monorepo-scripts | |
parent | 8bebffb14775234d5cc8dd730ba6d55ebfa941c7 (diff) | |
download | dexon-sol-tools-04e00e0c2849951b352692a8d8327160dc7475f8.tar dexon-sol-tools-04e00e0c2849951b352692a8d8327160dc7475f8.tar.gz dexon-sol-tools-04e00e0c2849951b352692a8d8327160dc7475f8.tar.bz2 dexon-sol-tools-04e00e0c2849951b352692a8d8327160dc7475f8.tar.lz dexon-sol-tools-04e00e0c2849951b352692a8d8327160dc7475f8.tar.xz dexon-sol-tools-04e00e0c2849951b352692a8d8327160dc7475f8.tar.zst dexon-sol-tools-04e00e0c2849951b352692a8d8327160dc7475f8.zip |
Improve missing type detection
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r-- | packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 777d908fb..dfaaf1c07 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -22,6 +22,10 @@ interface ExportNameToTypedocNames { const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { BigNumber: 'http://mikemcl.github.io/bignumber.js', Error: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L134', + Buffer: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L262', + 'solc.StandardContractOutput': + 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#output-description', + 'solc.CompilerSettings': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#input-description', }; export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { @@ -159,9 +163,9 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: }); if (!_.isEmpty(missingReferences)) { throw new Error( - `${packageName} package needs to export ${missingReferences.join( - ', ', - )} from it's index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, + `${packageName} package needs to export: \n${missingReferences.join( + '\n', + )} \nFrom it\'s index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, ); } @@ -201,7 +205,7 @@ function getAllReferenceNames(propertyName: string, node: any, referenceNames: s } // Some nodes of type reference are for subtypes, which we don't want to return. // We therefore filter them out. - const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites']; + const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites', 'extendedTypes']; if ( !_.isUndefined(node.type) && _.isString(node.type) && |