AsaAyers / js-hyperclick

A hyperclick provider that lets you jump to where variables are defined.
MIT License
127 stars 42 forks source link

Properties are sometimes clickable #90

Open AsaAyers opened 6 years ago

AsaAyers commented 6 years ago
import { foo } from './foo'

function bar() {
    foo.bar()
    //  ^ js-hyperclick sees this `bar` as a link and jumps to the function declaration.
}

I think I'm going to updated it so that the whole foo.bar is clickable, but it will just be a shortcut for clicking foo. Properties are not statically analyzable without guessing, so using the attached variable (foo) as the anchor is the next best thing I can do to supporting properties.