0
type A = {
    a: string
}

type B = {
    b: string
}

type C = A & B

When I hover over C I get

enter image description here

How can I see the end result literal, ie how can I see something like this

enter image description here

Additionally even if the type C has thousands of properties I want to see all of them. VSCode's Intelli Sense often hides all those extra properties behind ... 27 more ...;.

david_adler
  • 9,690
  • 6
  • 57
  • 97
  • 1
    Does this answer your question? [How can I see the full expanded contract of a Typescript type?](https://stackoverflow.com/questions/57683303/how-can-i-see-the-full-expanded-contract-of-a-typescript-type) – Tobias S. Oct 12 '22 at 10:27
  • 1
    You could do something like this: `type C = Readonly;` – Joel Oct 12 '22 at 10:28
  • What if both types contain a member variable called `a` for instance? What do you expect to be shown then? – Joel Oct 12 '22 at 10:35
  • @TobiasS. the Expand generic helps but it's not great for large types as it just says `... 27 more ...;` over a certain threshold – david_adler Oct 12 '22 at 11:25
  • Quick tip if you want to see the "thousands" of properties. You can kinda mimic this by using another type, `type X = C[""]`, and trigger intellisense inside the quotes. You'll be able to browse the properties there and see their types (if it's small enough). – kelsny Oct 12 '22 at 18:40

0 Answers0