Skip to content

can't navigate javascript with manual namespaces #7632

New issue

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

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

Already on GitHub? # to your account

Closed
jrieken opened this issue Mar 22, 2016 · 8 comments
Closed

can't navigate javascript with manual namespaces #7632

jrieken opened this issue Mar 22, 2016 · 8 comments
Assignees
Labels
Fixed A PR has been merged for this issue Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue

Comments

@jrieken
Copy link
Member

jrieken commented Mar 22, 2016

From @chadbr on March 22, 2016 0:18

I have large legacy codebase with "manual" style namespacing like this:

//namespaces
var my = my || {};
my.app = my.app || {};

and "classes" declared like this:

my.app.Application` = (function () {
var Application = function () {
...
};
return Application;
})();

I've tried several combinations of jsconfig.json parameters and none allow me to navigate this style of code. Should this work?

  • VSCode Version: 0.10.11, 0.10.12-insider
  • OS Version: OSX 10.11.3

Steps to Reproduce:

  1. Open attached project or github repo https://github.com/chadbr/vscodeTestJS

vscodeTestJS.zip

  1. Open folder in vscode
  2. open src/app/application.js
  3. try to go to declaration of my.app.SomeView() -- nothing happens.

Copied from original issue: microsoft/vscode#4533

@jrieken
Copy link
Member Author

jrieken commented Mar 22, 2016

From @chadbr on March 22, 2016 0:21

oh - and FWIW, WebStorm allows me to navigate these files...

@unional
Copy link
Contributor

unional commented Jan 6, 2017

This is a major road block for our team to adapt VSCode and TypeScript because our main product is still using global namespace (due to ExtJS).

@chadbr
Copy link

chadbr commented Jan 6, 2017

I'm assuming this won't be supported any time soon (if ever...)

@aluanhaddad
Copy link
Contributor

This seems easily as reasonable as tracking prototype assignments.

@waderyan waderyan added the VS Code Tracked There is a VS Code equivalent to this issue label Jan 9, 2017
@mhegazy mhegazy added this to the TypeScript 2.2 milestone Jan 9, 2017
@mhegazy mhegazy modified the milestones: TypeScript 2.2, TypeScript 2.3 Feb 2, 2017
@mhegazy mhegazy modified the milestones: Future, TypeScript 2.3 Mar 24, 2017
@Cristy94
Copy link

Any news? It's very annoying that by simply namespacing objects you no longer get IntelliSense.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 28, 2017

@sandersn this should be addressed with your fix for #16489 with a small modification to recognize the pattern var x = x || {}.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 28, 2017

Another pattern referenced in microsoft/vscode#27246 is var x = window.x || {}

@mhegazy mhegazy modified the milestones: TypeScript 2.7, TypeScript 2.8 Jan 9, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Mar 8, 2018
@ghost
Copy link

ghost commented Jun 12, 2018

If https://github.com/tc39/proposal-nullish-coalescing advances, you may want to revisit this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Fixed A PR has been merged for this issue Suggestion An idea for TypeScript VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

8 participants