fix(38785): include in NavigationBar child items from default exported functions (#38915)

This commit is contained in:
Alexander T
2020-06-26 19:35:27 +03:00
committed by GitHub
parent 535914c6d5
commit 59f80970d9
3 changed files with 115 additions and 5 deletions

View File

@@ -310,9 +310,11 @@ namespace ts.NavigationBar {
case SyntaxKind.ExportAssignment: {
const expression = (<ExportAssignment>node).expression;
if (isObjectLiteralExpression(expression)) {
const child = isObjectLiteralExpression(expression) ? expression :
isArrowFunction(expression) || isFunctionExpression(expression) ? expression.body : undefined;
if (child) {
startNode(node);
addChildrenRecursively(expression);
addChildrenRecursively(child);
endNode();
}
else {