title: TypeScript: Type Argument for type parameter 'R' cannot be inferred from the usage
body: <p>With TypeScript 1.6 and native es6 Promises I'm getting an error whenever I use <code>Promise.all([])</code> with two different return types. For example:</p>
  
  <pre><code>let onePromise:Promise&lt;string[]&gt; = getOne();
  let twoPromise:Promise&lt;MyObject&gt; = getTwo();
  
  Promise.all([onePromise, twoPromise])
      .then((values:[string[], MyObject]) =&gt; {
          let one:string[] = values[0];
          let two:MyObject = values[1];
  
          // do stuff
      });
  </code></pre>
  
  <p>In that example I get an error on the <code>Promise.all</code> line from the TypeScript compiler <code>error TS2453: The type argument for type parameter 'R' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'string[]' is not a valid type argument because it is not a supertype of candidate 'MyObject'. Property 'length' is missing in type 'MyObject'.</code></p>
  
  <p>I actually have another example of this where the second and third sentences of the error are different, but that first sentence is the same. So basically I'm wondering what the syntax is for 'specifying the type arguments explicitly'. I can't seem to figure it out. The code runs fine, but I would like to get rid of this transpiler warning.</p>