diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-24 22:36:35 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-02 20:10:24 +0800 |
commit | 0499541e114e6dd36565428f4f914e0dbdece2b8 (patch) | |
tree | 6d4740f4343f4516a9ecafc4795b68aed0865c75 /packages/react-docs | |
parent | f08738e13379ea86a33ad9be9f7579e637e69acb (diff) | |
download | dexon-sol-tools-0499541e114e6dd36565428f4f914e0dbdece2b8.tar dexon-sol-tools-0499541e114e6dd36565428f4f914e0dbdece2b8.tar.gz dexon-sol-tools-0499541e114e6dd36565428f4f914e0dbdece2b8.tar.bz2 dexon-sol-tools-0499541e114e6dd36565428f4f914e0dbdece2b8.tar.lz dexon-sol-tools-0499541e114e6dd36565428f4f914e0dbdece2b8.tar.xz dexon-sol-tools-0499541e114e6dd36565428f4f914e0dbdece2b8.tar.zst dexon-sol-tools-0499541e114e6dd36565428f4f914e0dbdece2b8.zip |
Move order utils to @0xproject/order-utils
Diffstat (limited to 'packages/react-docs')
-rw-r--r-- | packages/react-docs/src/types.ts | 1 | ||||
-rw-r--r-- | packages/react-docs/src/utils/typedoc_utils.ts | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 3b4a57ad5..f4e61edc9 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -94,6 +94,7 @@ export enum KindString { Method = 'Method', Interface = 'Interface', TypeAlias = 'Type alias', + ObjectLiteral = 'Object literal', Variable = 'Variable', Function = 'Function', Enumeration = 'Enumeration', diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 9c89b135a..0c7803a04 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -93,10 +93,16 @@ export const typeDocUtils = { throw new Error('`react-docs` only supports projects with 1 exported class per file'); } const isClassExport = packageDefinitionWithMergedChildren.children[0].kindString === KindString.Class; + const isObjectLiteralExport = + packageDefinitionWithMergedChildren.children[0].kindString === KindString.ObjectLiteral; if (isClassExport) { entities = packageDefinitionWithMergedChildren.children[0].children; const commentObj = packageDefinitionWithMergedChildren.children[0].comment; packageComment = !_.isUndefined(commentObj) ? commentObj.shortText : packageComment; + } else if (isObjectLiteralExport) { + entities = packageDefinitionWithMergedChildren.children[0].children; + const commentObj = packageDefinitionWithMergedChildren.children[0].comment; + packageComment = !_.isUndefined(commentObj) ? commentObj.shortText : packageComment; } else { entities = packageDefinitionWithMergedChildren.children; } |