Skip to content

Go to Definiton does not work in JavaScript namespace #15996

Closed
@mjbvz

Description

@mjbvz

From @StaticNoiseLog on May 22, 2017 1:6

  • VSCode Version: Code 1.12.2 (19222cdc84ce72202478ba1cec5cb557b71163de, 2017-05-10T13:20:36.315Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author Version
vscode-eslint dbaeumer 1.2.11
vscode-firefox-debug hbenl 0.13.1
debugger-for-chrome msjsdiag 3.1.1
unity-debug Unity 1.2.0

Steps to Reproduce:

  1. Create a JavaScript File with this content (the variable c99 is used to wrap the Game class in its own namespace, a common pattern in JavaScript):
var c99 = {};

c99.Game = (function () {
    function Count99Game() {
        console.log('Count99 game starts.');
        this.initGame();
    }

    Count99Game.prototype.initGame = function () {
        this.nextCountLabel = document.getElementById('next-count');
    };

    return Count99Game;
})();
  1. Right-click on the "initGame" function on line 6 and choose "Go to Definition". Nothing happens. Expected behavior: The cursor should be positioned on line 9 where the function is defined. Works in NetBeans, for example.

Copied from original issue: microsoft/vscode#27045

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyDomain: Symbol NavigationRelates to go-to-definition, find-all-references, highlighting/occurrences.VS 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