Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to Definiton does not work in JavaScript namespace #15996

Closed
mjbvz opened this issue May 22, 2017 · 3 comments
Closed

Go to Definiton does not work in JavaScript namespace #15996

mjbvz opened this issue May 22, 2017 · 3 comments
Labels
Bug A bug in TypeScript Domain: JavaScript The issue relates to JavaScript specifically Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences. VS Code Tracked There is a VS Code equivalent to this issue
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented May 22, 2017

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

@mjbvz mjbvz self-assigned this May 22, 2017
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label May 22, 2017
@mjbvz mjbvz removed their assignment May 22, 2017
@mhegazy mhegazy added Duplicate An existing issue was already created Bug A bug in TypeScript and removed Duplicate An existing issue was already created labels May 22, 2017
@mhegazy mhegazy added the Salsa label May 22, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Nov 28, 2017

Seems to be same root cause as #16489

@mhegazy mhegazy added this to the TypeScript 2.7 milestone Nov 28, 2017
@mhegazy mhegazy modified the milestones: TypeScript 2.7, TypeScript 2.8 Jan 9, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Mar 9, 2018

Partially fixed by #21974. this assignments in nested functions are not tracked correctly still.

@mhegazy mhegazy modified the milestones: TypeScript 2.8, TypeScript 2.9 Mar 9, 2018
@mhegazy mhegazy modified the milestones: TypeScript 3.0, Future Jul 2, 2018
@weswigham weswigham added Domain: JavaScript The issue relates to JavaScript specifically and removed Salsa labels Nov 29, 2018
@DanielRosenwasser DanielRosenwasser added the Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences. label Nov 8, 2019
@sandersn sandersn removed their assignment Jan 7, 2020
@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 27, 2020

This example now seems to be working for me (shown by the references code lens):

Screen Shot 2020-10-27 at 3 37 33 PM

@mjbvz mjbvz closed this as completed Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: JavaScript The issue relates to JavaScript specifically Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences. VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

5 participants