Question: Is there a simple way to get a type reduced to only primitives?
Open
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
For example, if I have a type that is:
```
type Company = {
name: string
employees: Person[]
}
type Person = {
name: string
age: number
}
```
How can I get the deeply interpreted type, so that in Company instead of a reference to another type alias I get the properties of Person in there.
Contributor guide
Research direction
No file, test, or entry point is named. Start by checking ts-morph's type APIs and the TypeScript compiler's type model for recursively expanding aliases. Done means determining whether a supported API provides this result or documenting the limitation and required scope.
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