How to force VSCode to show expanded types
typescriptvscode
I always forget this gem piece of TypeScript that allows you to force VSCode to show properties inside of a type. So instead of seeing a reference to the type name you get the full properties inside of the type
type Prettify<Obj> = { [k in keyof Obj]: Obj[k] } & {};
So, instead of seeing this:
You see this:
Also when you have intersections like this:
type Intersected = { a: number } & { b: number };
Instead of seeing this:
You see this:
I learnt this from @mattpocockuk