Move order utils to @0xproject/order-utils
This commit is contained in:
@@ -94,6 +94,7 @@ export enum KindString {
|
||||
Method = 'Method',
|
||||
Interface = 'Interface',
|
||||
TypeAlias = 'Type alias',
|
||||
ObjectLiteral = 'Object literal',
|
||||
Variable = 'Variable',
|
||||
Function = 'Function',
|
||||
Enumeration = 'Enumeration',
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user