Skip to content

Export default child items not included in 'navtree' #37877

Closed
@mjbvz

Description

@mjbvz

From microsoft/vscode#94630

TypeScript Version: 3.9.0-dev.20200409

Search Terms:

  • tsserver
  • navtree

Code

export default {
    foo: 1,
  };
  export const hello = {
    world: 2,
  }; 

Bug:
The nav tree does not include an entry for foo in it:

[Trace  - 23:25:07.33] <syntax> Response received: navtree (6). Request took 4 ms. Success: true 
Result: {
    "text": "\"test\"",
    "kind": "module",
    "kindModifiers": "",
    "spans": [
        {
            "start": {
                "line": 1,
                "offset": 1
            },
            "end": {
                "line": 6,
                "offset": 6
            }
        }
    ],
    "childItems": [
        {
            "text": "default",
            "kind": "const",
            "kindModifiers": "export",
            "spans": [
                {
                    "start": {
                        "line": 1,
                        "offset": 1
                    },
                    "end": {
                        "line": 3,
                        "offset": 5
                    }
                }
            ]
        },
        {
            "text": "hello",
            "kind": "const",
            "kindModifiers": "export",
            "spans": [
                {
                    "start": {
                        "line": 4,
                        "offset": 16
                    },
                    "end": {
                        "line": 6,
                        "offset": 4
                    }
                }
            ],
            "nameSpan": {
                "start": {
                    "line": 4,
                    "offset": 16
                },
                "end": {
                    "line": 4,
                    "offset": 21
                }
            },
            "childItems": [
                {
                    "text": "world",
                    "kind": "property",
                    "kindModifiers": "",
                    "spans": [
                        {
                            "start": {
                                "line": 5,
                                "offset": 5
                            },
                            "end": {
                                "line": 5,
                                "offset": 13
                            }
                        }
                    ],
                    "nameSpan": {
                        "start": {
                            "line": 5,
                            "offset": 5
                        },
                        "end": {
                            "line": 5,
                            "offset": 10
                        }
                    }
                }
            ]
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: OutliningRelates to multi-line regions that editors can collapse

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions