title: Typescript - interface extending another interface with nested properties
body: <p>I have an interface like:</p>
  
  <pre><code>export interface Module {
    name: string;
    data: any;
    structure: {
      icon: string;
      label: string;
      ...
    }
  }
  </code></pre>
  
  <p>How can I extend it, so that I add some new properties to structure, without repeating myself? Do I have to make a new interface for structure and extend that and make a new Module with the new structure interface or is there some other syntax to achieve this? </p>
  
  <p>Ideally, I would just write something like:</p>
  
  <pre><code>export interface DataModule extends Module {
    structure: {
      visible: boolean;
    }
  }
  
  export interface UrlModule extends Module {
    structure: {
      url: string;
    }
  }
  </code></pre>
  
  <p>Thanks!</p>