title: Typescript Interface Flattening
body: <p>I have the following Typescript interface:</p>
  
  <pre><code>export interface Teammate {
    id: number;
    name: string;
    user: {
      email: string;
    };
  }
  </code></pre>
  
  <p>That's how it comes from a GraphQL server, and I can't seem to "transform" it using Apollo Client. My question is, can I somehow create an <code>email</code> attribute of the above interface that would automatically "copy" the value from the nested attribute?</p>
  
  <p>...as follows:</p>
  
  <pre><code>export interface Teammate {
    id: number;
    name: string;
    email: &lt;= a function/Typescript method to copy user.email somehow over here?
    user: {
      email: string;
    };
  }
  </code></pre>
  
  <p>Thanks,
  Sammy</p>