Skip to content

[TSServer] navto Does not Return Methods Assigned to Prototype #13875

@mjbvz

Description

@mjbvz

From microsoft/vscode#19782

TypeScript Version: 2.1.5

Code

function myHello() {}

function MyComponent() {}
MyComponent.prototype.hello = function (){}

Make a navto request against TSServer with a search string of hello

Expected behavior:
Return entries for both hello and myHello

Actual behavior:
Only an entry for myHello is returned:

[Trace - 2:28:58 PM] Sending request: navto (247). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/sand/xx/y.js",
    "searchValue": "hello"
}
[Trace - 2:28:58 PM] Response received: navto (247). Request took 42 ms. Success: true 
Result: [
    {
        "name": "myHello",
        "kind": "function",
        "file": "/Users/matb/projects/sand/xx/y.js",
        "start": {
            "line": 1,
            "offset": 1
        },
        "end": {
            "line": 1,
            "offset": 22
        },
        "matchKind": "substring"
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions