Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

navtree does not include entry for export default of an expression #34601

Copy link
Copy link
@mjbvz

Description

@mjbvz
Issue body actions

From microsoft/vscode#79686

TypeScript Version: 3.7.0-dev.20191016

Search Terms:

  • navtree
  • outline
  • tsserver

Code
For the code:

const abc = 12;

export default abc;
  1. Make a navtree request against TS Server

Expected behavior:
An entry for the export default abc is included. VS Code needs this information in order to show the references code lens on the default export

Actual behavior:
No entry for the export itself is returned

[Trace  - 4:23:03 PM] <syntax> Response received: navtree (225). Request took 1 ms. Success: true 
Result: {
    "text": "\"foo\"",
    "kind": "module",
    "kindModifiers": "",
    "spans": [
        {
            "start": {
                "line": 1,
                "offset": 1
            },
            "end": {
                "line": 4,
                "offset": 4
            }
        }
    ],
    "childItems": [
        {
            "text": "abc",
            "kind": "const",
            "kindModifiers": "",
            "spans": [
                {
                    "start": {
                        "line": 1,
                        "offset": 7
                    },
                    "end": {
                        "line": 1,
                        "offset": 15
                    }
                }
            ],
            "nameSpan": {
                "start": {
                    "line": 1,
                    "offset": 7
                },
                "end": {
                    "line": 1,
                    "offset": 10
                }
            }
        }
    ]
}
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.