In my work with TypeScript types, I find myself frequently using Omit
, Pick
, and similar tools based on other types. While it generally gets the job done, I often struggle with readability when dealing with complex type manipulations.
I am interested in finding a way to visualize the outcome of these type computations.
For example, consider the following code snippet :
type Item = {
value: string;
id: string;
}
type TitleItem = {
title: string;
} & Pick<Item, 'id'>
I am seeking a tool or plugin that can generate:
type TitleItem = {
title: string;
id: string;
}
I would prefer a solution within IntelliJ, but I am open to considering any recommended tool :)
(If anyone believes the issue lies within the code itself rather than the tools being used, you may have a point. However, this method helps in linking together types that should evolve collectively, so it's not entirely flawed.)