title: TypeScript doesn't raise error for incompatible promise returns
body: <p>I am working on a generic API calling method that allows consumers to pass a request callback that should return a promise which resolves to a specified <code>&lt;T&gt;</code> payload (aka Action). It boils down to something like this:</p>
  
  <pre><code>interface MyAction { type: string, value: string; }
  
  declare function call&lt;T&gt;(request: Promise&lt;T&gt;): void;
  
  declare const request: Promise&lt;{value: string}&gt;;
  
  // normal correct call
  call&lt;MyAction&gt;(request.then(({ value }) =&gt; ({ type: "foo", value })));
  </code></pre>
  
  <p>The problem I'm having is that it seems the <code>then()</code> allows for a lot return values that aren't strictly compatible with <code>T</code>.</p>
  
  <p>Here are some examples:</p>
  
  <pre><code>// bad: why no error on missing 'type'
  call&lt;MyAction&gt;(request);
  
  // good: error 'void' is not 'MyAction'
  call&lt;MyAction&gt;(request.then(result =&gt; { }));
  
  // good: error missing property 'type'
  call&lt;MyAction&gt;(request.then(result =&gt; ({ fake: "foo" })));
  
  // bad: why no error missing property 'value'
  call&lt;MyAction&gt;(request.then(result =&gt; ({ type: "foo" })));
  
  // bad: why no error for missing property 'type'
  call&lt;MyAction&gt;(request.then(({ value }) =&gt; ({ value })));
  
  // bad: why no error for unknown property 'fake'
  call&lt;MyAction&gt;(request.then(({ value }) =&gt; ({ type: "foo", value, fake: "foo" })));
  
  // bad: why no error for '{}' is not 'MyAction'
  call&lt;MyAction&gt;(request.then(({ value }) =&gt; ({})));
  </code></pre>
  
  <p>My question is:</p>
  
  <ol>
  <li>Why do these promises allow incompatible <code>T</code> return values? (Missing properties is the main concern.)</li>
  <li>What, if anything, can I do to make the return values more strictly match the <code>T</code> passed to <code>call&lt;T&gt;()</code>?</li>
  </ol>