mxsdev / ts-type-explorer

VSCode Extension & utilities for exploring TypeScript type information
https://marketplace.visualstudio.com/items?itemName=mxsdev.typescript-explorer&ssr=false
159 stars 4 forks source link

Focusing a type #35

Open b0o opened 1 year ago

b0o commented 1 year ago

While exploring complex types, I often create dummy types as a way to explore a certain part of the type in ts-type-explorer. For example, if I'm exploring this type:

type Context = InferContext<createContext>

I might want to explore Context['data']['user'] in more detail without hitting the recursion limit, so I'll do:

type Context = InferContext<createContext>
type Foo = Context['data']['user']

Instead, it would be nice if I could double-click the Context['data']['user'] node in the ts-type-explorer tree to "focus" it, making it the root of the tree.