Skip to content

Go to Definition on identifier should jump to require()'d path #34996

@DanielRosenwasser

Description

@DanielRosenwasser

Follow-up to #9251, and this has been driving me crazy for a long time now.

// ./a.js

class Blah {
  abc = 123;
}

module.exports.Blah = Blah;
// ./b.js

const BlahModule = require("./a.js");

new /**/BlahModule.Blah()
  1. Go to definition on /**/
  2. You will be taken to the declaration of BlahModule itself. Go to definition once more

Current Behavior

Nothing happens

Expected Behavior

Take me to the first line of ./a.js.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyDomain: LS: Symbol NavigationRelates to go-to-definition, find-all-references, highlighting/occurrences.FixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions