simulate_module_resolution
Resolve TypeScript imports by simulating module resolution, returning the final file path and all rejected candidates to explain why an import resolves or fails under Node16, NodeNext, or Bundler.
Instructions
Run TypeScript's exact module resolution algorithm for a given import and return the resolved file path plus every candidate path that was tried and rejected. Eliminates guesswork about why an import resolves (or fails to resolve) under Node16/NodeNext/Bundler strategies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| configPath | Yes | Absolute path to the tsconfig.json to use for resolution settings | |
| moduleName | Yes | The import specifier to resolve, e.g. ./utils/helpers or @/components/Button | |
| containingFile | Yes | Absolute path to the source file that contains the import |