title: Why does TypeScript not complain about properties not included in the state when casting?
body: <p>Why does TypeScript behave the way it does in my case?</p>
  
  <p>If I directly type an object, it complains about properties which are not defined in the interface. But if I cast the object it allows do add any random properties not defined in the interface.</p>
  
  <p>Best explained with an example:</p>
  
  <pre><code>interface House {
    windows: number;
    garden: boolean;
  }
  
  const house1: House = {
    windows: 5,
    garden: true,
    garage: true // not allowed
  };
  
  const whatever = {
    house2: &lt;House&gt; {
      windows: 3,
      garden: true,
      garage: true // why is it here allowed?
    }
  };
  </code></pre>