Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Confusing definition found for functions in some cases #38645

Open
elibarzilay opened this issue May 18, 2020 · 0 comments
Open

Confusing definition found for functions in some cases #38645

elibarzilay opened this issue May 18, 2020 · 0 comments
Labels
Bug A bug in TypeScript
Milestone

Comments

@elibarzilay
Copy link
Contributor

goToDefinition handles functions specially, leading to this confusing highlight:

let f1, f2;
f2 = f1 = function () {};
//   ^^
f1();

this is different from:

let g1, g2;
g2 = g1 = () => {};
//        ^^^^^^^^
g1();

which seems like a better choice in the former case too.

This is an issue that was raised in #38567 (which removes the first f1/g1 from the results but doesn't change the value highlights).

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label May 29, 2020
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants