title: How can I make one property non-optional in a typescript type?
body: <p>I have this type:</p>
  <pre><code>type User = { 
    id: string;
    name?: string;
    email?: string;
  }
  </code></pre>
  <p>And I would like to construct a similar type with <code>name</code> non optional:</p>
  <pre><code>type UserWithName = {
    id: string;
    name: string;
    email?: string;
  }
  </code></pre>
  <p>Instead of repeating the type as I did above, how can I construct <code>UserWithName</code> from <code>User</code> with generic utility types?<br />
  <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#requiredtype" rel="noreferrer">Required</a> almost does the job but it sets <em>all</em> properties as non-optional, while I just want to set <em>one</em> property.</p>