Skip to content

IntelliSense does not work for object property functions #12306

Closed

Description

  • VSCode Version: Code 1.5.2 (66f37fd, 2016-09-12T13:05:12.065Z)
  • OS Version: Darwin x64 15.6.0

Steps to Reproduce:

  1. Consider the following code:
(function(undefined) {
    MyView = Backbone.View.extend({
        secondFunc: function () {
            return;
        },

        mainFunc: function() {
            this.secondFunc()
        }
    });
})();
  1. The Goto Definition, Peek Definition and other IntelliSense features are not working for this.secondFunc() call.

Activity

  1. joaomoreno commented on Sep 20, 2016

    @joaomoreno
    Contributor

    Ilya Shuvalov (@ishuvalov) This is going to be very hard to get from the language service, because this isn't really bound to anything by semantically analysing the code. It's only due to the implicit knowledge of how Backbone.View.extend works.

    You could try using TypeScript, you'd get those language features all the way.

  2. ishuvalov commented on Sep 20, 2016

    @ishuvalov
    Author

    João Moreno (@joaomoreno) Thank you for your comment! Let's omit Backbone

    (function(undefined) {
        var myObj = {
            secondFunc: function () {
                return;
            },
    
            mainFunc: function() {
                this.secondFunc()
            }
        };
    })();

    Still not working. I understand the difficulties of this context, but the feature could work just finding all symbolic definitions in the workspace (or even just a current file) and allowing user to choose from. This how Sublime Text 3 works.
    Unfortunately the TypeScript is not an option for my project.

  3. waderyan commented on Sep 22, 2016

    @waderyan

    Ilya Shuvalov (@ishuvalov) thank you for opening this issue. I have repo'd this with JavaScript language service 2.0.2.

    Sending this to the TypeScript team as they provide the JavaScript language service.

  4. waderyan commented on Sep 23, 2016

    @waderyan

    This issue was moved to microsoft/TypeScript#11072

  5. added
    upstreamIssue identified as 'upstream' component related (exists outside of VS Code)
    on Sep 23, 2016
  6. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

javascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions