Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

code hints in inherited class by Class.create not showing, later use guess hint causes existing hint changedΒ #3660

Open

Description

@jodyzhang
  1. following following code snippet, try to get code hint after bruce.
var Vulnerable = {
    wound: function (hp) {
        this.health -= hp;
    },
    kill: function () {
    }
};

var Person = Class.create(Vulnerable, {
    initialize: function () {
        this.health = 100;
    }
});

var bruce = new Person();
bruce.

->code hints are: kill, wound, missing "initialize".
2. type initialize() after "bruce.".
3. get code hint by type bruce. again
->code hints now: initialize, wound, "kill" is removed

Expect:
at step 1, "initialize" should be found.
at step 3, code hint should be: initialize, kill, wound

Activity

  1. jodyzhang commented on May 3, 2013

    @jodyzhang
    ContributorAuthor

    I opened similar issue against tern. Marinj replied with following:
    "It appears that Prototype's Class.create is too complex a function to be properly interpreted by Tern. The best solution is probably for someone to write a JSON definition file (similar to defs/jquery.json) for the library. If you want to put in the effort, or if you can point me to a machine-readable specification of the Prototype interface, that'd be much appreciated."

    So maybe we can do something for this? thanks.

  2. pthiess commented on May 3, 2013

    @pthiess
    Contributor

    @adrocknaphobia Hi Adam, would you mind putting this on the community backlog. This way people could vote on it, we actually don't know how many would run into something like this.

  3. changed the title [-][js code hints]code hints in inherited class by Class.create not showing, later use guess hint causes existing hint changed.[/-] [+][js code hints] code hints in inherited class by Class.create not showing, later use guess hint causes existing hint changed.[/+] on Mar 17, 2014
  4. redmunds commented on Mar 17, 2014

    @redmunds
    Contributor

    Was assigned to adrock, so marking "Needs Review".

  5. self-assigned this
    on Apr 1, 2014
  6. changed the title [-][js code hints] code hints in inherited class by Class.create not showing, later use guess hint causes existing hint changed.[/-] [+]code hints in inherited class by Class.create not showing, later use guess hint causes existing hint changed[/+] on Apr 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions