-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Suggestion: ability to find imports for module #22374
Comments
Is that not sufficient for your scenarios? |
I'm after the opposite—to find all imports for the currently focused module. E.g.: // a.ts
// "find imports" used in this module will list the imports in `b.ts` and `c.ts`
export const foo = 'bar'; // b.ts
import('./a'); // c.ts
import './a'; |
I see.. I suppose we can expose this on the @andy-ms, @amcasey and @DanielRosenwasser thoughts? |
@OliverJAsh to confirm, you're not looking for consumers of |
That's right
…On Wed, 7 Mar 2018, 22:27 Andrew Casey, ***@***.***> wrote:
@OliverJAsh <https://github.com/oliverjash> to confirm, you're not
looking for consumers of foo, you're looking for consumers of a.ts?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22374 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA4QCWKI5foGTNg543095IQbHt6XsMphks5tcF54gaJpZM4Sgc09>
.
|
@mhegazy I agree that it's not clear how we would trigger such a search. Personally, I would expect invoking Find All References on the |
yeah.. then a new command is needed, but it wounder if that will be discoverable. |
Find references is a very useful feature, however sometimes I need to be able to find all imports of a given module:
This is sometimes necessary when a module has side effects, and you want to see which files imported it.
This might also be useful for dynamic imports. In one project we have several dynamic imports (for code splitting) that never explicitly reference the module exports, so if I use find references on those module exports, I will not be shown the dynamic import. For example, here is a dynamic import:
When I activate find references on the exports of that module, I am not shown the import:
The text was updated successfully, but these errors were encountered: