title: TypeScript: Define a sub-type explicitly
body: <p>Given type A, I want to define a sub-type B (B is assignable to A, without extra properties) and enforce that assign-ability.</p>
  <h3>Example</h3>
  <p>Given this type:</p>
  <pre><code>interface A {
    name?: string;
    age?: number;
  }
  </code></pre>
  <p>I want to define this type:</p>
  <pre><code>interface B {
    name: string;
  }
  </code></pre>
  <p>As you can see, any instance of PersonDescriptor is assignable to Person, but it is not enforced. If I add another property, I would like typescript to complain.</p>
  <h3>Unacceptable solutions</h3>
  <ol>
  <li>I cannot use extend, since it will the resulted type will be less strict than what I intend:</li>
  </ol>
  <pre><code>interface B extends A {
    name: string;
  }
  </code></pre>
  <p>Is equivalent to:</p>
  <pre><code>interface B {
    name: string;
    age?: number;
  }
  </code></pre>
  <p>And also I can add properties that does not exist on Person.</p>
  <ol start="2">
  <li>I cannot do <code>A extends B</code> since A is already provided, and B is the type I want to create.</li>
  </ol>