title: Excess properties allowed on union type in object initializer
body: <p>I'm quite new to typescript, I'd like to know how to make this function.
  I have something that closely resembles the following union type structure setup. Unfortunately it doesn't quite work as I'd expect. The <code>failType</code> below, contains properties of both <code>NodeA</code> and <code>NodeB</code> types.</p>
  <p>I would expect both <code>captureContentId</code> and <code>nodes</code> to give me an error or al least have to compiler tell me that it can't figure out which of the four types it is supposed to be. Right now this just silently works.</p>
  <p>Did I miss some syntax somewhere or is what I want to achieve just not possible? You can check out the code in the <a href="https://www.typescriptlang.org/play?noImplicitOverride=true&amp;noUnusedLocals=true#code/C4TwDgpgBAwghmYBXATtAvFA3gWAFBSFRpwAmA9gHYA2IUA2gNYBcUAzsCgJaUDmUAHyiUkAWwBGEFAF1WWYhDJVaUAMZVgESsACSpAPysREqQG4FSmnUrlSENoagBBFCjggAPDsqrqSOwByttBCQXZOglBhEABCAHxQAL6m%20In4%20DyaKABmcKrQ0RG4BEQkFFZqGlq6BkZikigpJYRlynSqCMhoDqzwiKgQTWl4GdpSuflRwTHY%20EQW5SrqY9p6jsYNTfOtFR39aDBVq7XC9WbpzQttUJK8PH1d9o4PA1uliot0WqQv3c%20drwu2w%201xsdh6zlc7i8Pj8gWCkUKiOmcSGF0y4zy0G8vn8EGis0uOxUPFxdlYAFVKFwqAAVcCDVLosY5LFTcJQujFYGWFRg%20ysFxuTw4uH4hGhYIRSV2eJokZ4UCQKBUmmUenKzCivEEmUQaXs2LIjnCpoXZYcKBwDUQSnUukMqCYblEPaPNhyKAARk9y00x1YAFYAAyhpJJAA0qTNeAtwCguS41BtdrVNqdhPmfuqelYABZQwBmKOXN0DD2Z%20ZEH3YSorGqsQuhgCckbmRESJfbhAA9D2oLSABb2aBsQfkJDUUjCcjxyRW6jUcgAdwgpAjUBAEHjwGHdDgaH03bUAIORwbUALzebJfm-Ir9HkpLFrGtjsS0hLySAA" rel="nofollow noreferrer">typescript playground here</a>.</p>
  <pre><code>type Capture = {
      readonly [k: string | number]: { readonly contentId?: number; readonly nodes?: Array&lt;IncludeNode | NodeA | NodeB&gt; };
  }
  
  interface NodeA {
      readonly contentId?: number;
      readonly captures?: Capture;
  }
  
  interface NodeB {
      readonly contentId?: number;
      readonly captureContentId?: number;
  
      readonly beginCaptures?: Capture;
      readonly endCaptures?: Capture;
  
      readonly nodes?: Array&lt;IncludeNode | NodeA | NodeB&gt;;
  }
  
  interface IncludeNode {
      readonly include: UnionType;
  }
  
  interface NodeArray {
      readonly nodes: Array&lt;IncludeNode | NodeA | NodeB&gt;;
  }
  
  type UnionType = IncludeNode | NodeA | NodeB | NodeArray;
  
  
  const aType: UnionType = {
      captures: { 1: { contentId: 5000 } },
  };
  
  const failType: UnionType = {
      contentId: 4003,
      captures: {
          1: { contentId: 3009 },
      },
  
      // These should not be allowed, yet they are?
      captureContentId: 4099,
      nodes: [{ include: aType }],
  };
  </code></pre>