microsoft / microsoft/TypeScript
Suggestion: ability to find imports for module
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Find references is a very useful feature, however sometimes I need to be able to find all imports of a given module:
- regardless of what they're exporting
- but the module does not have any exports
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:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files or tests. Start by reproducing Find References on a module with side effects and on a dynamic import, then trace the language-service behavior that resolves references. Done means imports are discoverable even when no exports are referenced, including dynamic imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100