File tree Expand file tree Collapse file tree 3 files changed +76
-1
lines changed Expand file tree Collapse file tree 3 files changed +76
-1
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,18 @@ namespace ts.NavigationBar {
307
307
addNodeWithRecursiveChild ( node , getInteriorModule ( < ModuleDeclaration > node ) . body ) ;
308
308
break ;
309
309
310
- case SyntaxKind . ExportAssignment :
310
+ case SyntaxKind . ExportAssignment : {
311
+ const expression = ( < ExportAssignment > node ) . expression ;
312
+ if ( isObjectLiteralExpression ( expression ) ) {
313
+ startNode ( node ) ;
314
+ addChildrenRecursively ( expression ) ;
315
+ endNode ( ) ;
316
+ }
317
+ else {
318
+ addLeafNode ( node ) ;
319
+ }
320
+ break ;
321
+ }
311
322
case SyntaxKind . ExportSpecifier :
312
323
case SyntaxKind . ImportEqualsDeclaration :
313
324
case SyntaxKind . IndexSignature :
Original file line number Diff line number Diff line change 5
5
//// export default () => ""
6
6
//// export default abc;
7
7
//// export default class AB {}
8
+ //// export default {
9
+ //// a: 1,
10
+ //// b: 1,
11
+ //// c: {
12
+ //// d: 1
13
+ //// }
14
+ //// }
8
15
9
16
verify . navigationTree ( {
10
17
"text" : '"navigationItemsExportDefaultExpression"' ,
@@ -20,6 +27,31 @@ verify.navigationTree({
20
27
"kind" : "function" ,
21
28
"kindModifiers" : "export"
22
29
} ,
30
+ {
31
+ "text" : "default" ,
32
+ "kind" : "const" ,
33
+ "kindModifiers" : "export" ,
34
+ "childItems" : [
35
+ {
36
+ "text" : "a" ,
37
+ "kind" : "property"
38
+ } ,
39
+ {
40
+ "text" : "b" ,
41
+ "kind" : "property"
42
+ } ,
43
+ {
44
+ "text" : "c" ,
45
+ "kind" : "property" ,
46
+ "childItems" : [
47
+ {
48
+ "text" : "d" ,
49
+ "kind" : "property"
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ } ,
23
55
{
24
56
"text" : "AB" ,
25
57
"kind" : "class" ,
Original file line number Diff line number Diff line change 6
6
//// export = function () {}
7
7
//// export = () => ""
8
8
//// export = class AB {}
9
+ //// export = {
10
+ //// a: 1,
11
+ //// b: 1,
12
+ //// c: {
13
+ //// d: 1
14
+ //// }
15
+ //// }
9
16
10
17
verify . navigationTree ( {
11
18
"text" : '"navigationItemsExportEqualsExpression"' ,
@@ -26,6 +33,31 @@ verify.navigationTree({
26
33
"kind" : "class" ,
27
34
"kindModifiers" : "export"
28
35
} ,
36
+ {
37
+ "text" : "export=" ,
38
+ "kind" : "const" ,
39
+ "kindModifiers" : "export" ,
40
+ "childItems" : [
41
+ {
42
+ "text" : "a" ,
43
+ "kind" : "property"
44
+ } ,
45
+ {
46
+ "text" : "b" ,
47
+ "kind" : "property"
48
+ } ,
49
+ {
50
+ "text" : "c" ,
51
+ "kind" : "property" ,
52
+ "childItems" : [
53
+ {
54
+ "text" : "d" ,
55
+ "kind" : "property"
56
+ }
57
+ ]
58
+ }
59
+ ]
60
+ } ,
29
61
{
30
62
"text" : "abc" ,
31
63
"kind" : "const"
You can’t perform that action at this time.
0 commit comments