mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
fix(37877): include in NavigationBar default exported child items (#38255)
This commit is contained in:
parent
f4872eb493
commit
5895493815
@ -307,7 +307,18 @@ namespace ts.NavigationBar {
|
||||
addNodeWithRecursiveChild(node, getInteriorModule(<ModuleDeclaration>node).body);
|
||||
break;
|
||||
|
||||
case SyntaxKind.ExportAssignment:
|
||||
case SyntaxKind.ExportAssignment: {
|
||||
const expression = (<ExportAssignment>node).expression;
|
||||
if (isObjectLiteralExpression(expression)) {
|
||||
startNode(node);
|
||||
addChildrenRecursively(expression);
|
||||
endNode();
|
||||
}
|
||||
else {
|
||||
addLeafNode(node);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SyntaxKind.ExportSpecifier:
|
||||
case SyntaxKind.ImportEqualsDeclaration:
|
||||
case SyntaxKind.IndexSignature:
|
||||
|
||||
@ -5,6 +5,13 @@
|
||||
//// export default () => ""
|
||||
//// export default abc;
|
||||
//// export default class AB {}
|
||||
//// export default {
|
||||
//// a: 1,
|
||||
//// b: 1,
|
||||
//// c: {
|
||||
//// d: 1
|
||||
//// }
|
||||
//// }
|
||||
|
||||
verify.navigationTree({
|
||||
"text": '"navigationItemsExportDefaultExpression"',
|
||||
@ -20,6 +27,31 @@ verify.navigationTree({
|
||||
"kind": "function",
|
||||
"kindModifiers": "export"
|
||||
},
|
||||
{
|
||||
"text": "default",
|
||||
"kind": "const",
|
||||
"kindModifiers": "export",
|
||||
"childItems": [
|
||||
{
|
||||
"text": "a",
|
||||
"kind": "property"
|
||||
},
|
||||
{
|
||||
"text": "b",
|
||||
"kind": "property"
|
||||
},
|
||||
{
|
||||
"text": "c",
|
||||
"kind": "property",
|
||||
"childItems": [
|
||||
{
|
||||
"text": "d",
|
||||
"kind": "property"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "AB",
|
||||
"kind": "class",
|
||||
|
||||
@ -6,6 +6,13 @@
|
||||
//// export = function () {}
|
||||
//// export = () => ""
|
||||
//// export = class AB {}
|
||||
//// export = {
|
||||
//// a: 1,
|
||||
//// b: 1,
|
||||
//// c: {
|
||||
//// d: 1
|
||||
//// }
|
||||
//// }
|
||||
|
||||
verify.navigationTree({
|
||||
"text": '"navigationItemsExportEqualsExpression"',
|
||||
@ -26,6 +33,31 @@ verify.navigationTree({
|
||||
"kind": "class",
|
||||
"kindModifiers": "export"
|
||||
},
|
||||
{
|
||||
"text": "export=",
|
||||
"kind": "const",
|
||||
"kindModifiers": "export",
|
||||
"childItems": [
|
||||
{
|
||||
"text": "a",
|
||||
"kind": "property"
|
||||
},
|
||||
{
|
||||
"text": "b",
|
||||
"kind": "property"
|
||||
},
|
||||
{
|
||||
"text": "c",
|
||||
"kind": "property",
|
||||
"childItems": [
|
||||
{
|
||||
"text": "d",
|
||||
"kind": "property"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "abc",
|
||||
"kind": "const"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user