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

Allow to find-all-references on the default keyword. #13662

Closed
ghost opened this issue Jan 24, 2017 · 2 comments
Closed

Allow to find-all-references on the default keyword. #13662

ghost opened this issue Jan 24, 2017 · 2 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Jan 24, 2017

Could be useful for code like export default 0;.
Original suggestion: #11551 (comment)

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label May 24, 2017
@OliverJAsh
Copy link
Contributor

I have a large codebase where we use anonymous exports everywhere. It's quite common in React component files, for example, where you want to apply higher-order components to the export:

const Component = () => null
export default connect(mapStateToProps)(Component);

I would love to see this fixed so we can continue using find references on these exports.

@borekb
Copy link

borekb commented Aug 23, 2017

This would be useful indeed. In our React project, we have something similar that @OliverJAsh described. Here's an example that compares a plain component with a wrapped one:

Plain component

image

F12 navigates to MyComponent:

image

and Find All References lists usages in App.tsx:

image

Wrapped component

F12 from App.tsx takes me here:

image

but running Find All References at this very place produces no results:

image

so the experience is quite a bit worse.

Thanks for considering this.

@mhegazy mhegazy added Bug A bug in TypeScript and removed Needs Investigation This issue needs a team member to investigate its status. labels Aug 23, 2017
@mhegazy mhegazy assigned ghost Aug 23, 2017
@mhegazy mhegazy added this to the TypeScript 2.6 milestone Aug 23, 2017
@ghost ghost closed this as completed in #17992 Sep 7, 2017
@ghost ghost added the Fixed A PR has been merged for this issue label Sep 7, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

4 participants