Is it possible to detect import from alias paths using ts-morph?
Open
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
I set the path alias in my tsconfig.json:
```
paths: {
"module/*": ["./src/app/module/*"],
...
}
```
and I have import like this:
```
import { foo } from '@module/foo';
```
Is it possible to know if the import is from alias paths?
Contributor guide
Research direction
Start by reading the ts-morph API around import declarations and how it represents the configured paths in tsconfig.json. Reproduce the example import from '@module/foo' and determine whether the API exposes enough information to identify an alias import. Done means a documented, supported way to detect this case, or a clearly scoped limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100