title: How can I see the full expanded contract of a Typescript type?
body: <p>If I have a collection of types that looks a bit like this:</p>
  <pre><code>type ValidValues = string | number | null
  type ValidTypes = &quot;text&quot; | &quot;time&quot; | &quot;unknown&quot;
  
  type Decorated = {
    name?: string | null
    type?: ValidTypes
    value?: ValidValues
    title: string
    start: number
  }
  
  type Injected = {
    extras: object
  }
  
  // overriding the types from Decorated
  type Text = Decorated &amp; Injected &amp; {
    name: string
    type: &quot;text&quot;
    value: string
  }
  </code></pre>
  <p>My actual code has more going on, but this shows the core idea. I don't want to have to trust myself to get the relationships between types just right. I want tooling to show me what the type definition for <code>Text</code> &quot;evaluates&quot; to, after all the type algebra.</p>
  <p>So for the above example, I'm hoping the fields specified in <code>Text</code> will override the previous declarations made in the <code>Decorated</code> type, and the output of a hypothetical tooltip should show me something like this:</p>
  <pre><code>{
    name: string
    type: &quot;text&quot;
    value: string
    title: string
    start: number
    extras: object
  }
  </code></pre>
  <p>Is there any convenient way to get this information?</p>