<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7121557/5150816/e978537c-718a-11e4-8b90-91c9b833b138.png"><img src="https://cloud.githubusercontent.com/assets/7121557/5150816/e978537c-718a-11e4-8b90-91c9b833b138.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Since there's a length property in each part of the union this is a legal property access but then we merge the doc descriptions without de-duping or differentiating which description is which (ie if each type had a length property of the same type but with a different description).</p>
<p dir="auto">I have an issue during writing a piece of declaration for existing node.js module - bluebird.js. The module has a method named <code class="notranslate">props</code> which gets an object has promises in it then return an object have same property names. It seems like object-version <code class="notranslate">map</code>. I wanted to add types for that.</p>
<p dir="auto">For <code class="notranslate">all</code> I can easily get the types like</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  static all&lt;T1, T2&gt;(values: [Promise.Thenable&lt;T1&gt;, Promise.Thenable&lt;T2&gt;]): Promise&lt;[T1, T2]&gt;;
  static all&lt;T1, T2, T3&gt;(values: [Promise.Thenable&lt;T1&gt;, Promise.Thenable&lt;T2&gt;, Promise.Thenable&lt;T3&gt;]): Promise&lt;[T1, T2, T3]&gt;;
  // ..."><pre class="notranslate">  <span class="pl-s1">static</span> <span class="pl-s1">all</span><span class="pl-c1">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">,</span> <span class="pl-smi">T2</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">values</span>: <span class="pl-kos">[</span><span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T2</span><span class="pl-kos">&gt;</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-kos">[</span><span class="pl-smi">T1</span><span class="pl-kos">,</span> <span class="pl-smi">T2</span><span class="pl-kos">]</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span>
  <span class="pl-k">static</span> <span class="pl-smi">all</span><span class="pl-kos">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">,</span> <span class="pl-smi">T2</span><span class="pl-kos">,</span> <span class="pl-smi">T3</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">values</span>: <span class="pl-kos">[</span><span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T2</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T3</span><span class="pl-kos">&gt;</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-kos">[</span><span class="pl-smi">T1</span><span class="pl-kos">,</span> <span class="pl-smi">T2</span><span class="pl-kos">,</span> <span class="pl-smi">T3</span><span class="pl-kos">]</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span>
  <span class="pl-c">// ...</span></pre></div>
<p dir="auto">But for <code class="notranslate">props</code> the other hand,</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  static props&lt;T1&gt;(object: {[k:string]: Promise.Thenable&lt;T1&gt;}): Promise&lt;{[k:string]: T1}&gt;;"><pre class="notranslate">  <span class="pl-s1">static</span> <span class="pl-s1">props</span><span class="pl-c1">&lt;</span><span class="pl-smi">T1</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">object</span>: <span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s1">k</span>:<span class="pl-smi">string</span><span class="pl-kos">]</span>: <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">&gt;</span><span class="pl-kos">}</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s1">k</span>:<span class="pl-smi">string</span><span class="pl-kos">]</span>: <span class="pl-smi">T1</span><span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">I'm getting this</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bluebird/bluebird-tests.ts(530,10): error TS2339: Property 'foo' does not exist on type '{ [k: string]: Foo; }'.
bluebird/bluebird-tests.ts(534,10): error TS2339: Property 'bar' does not exist on type '{ [k: string]: Bar; }'."><pre class="notranslate"><code class="notranslate">bluebird/bluebird-tests.ts(530,10): error TS2339: Property 'foo' does not exist on type '{ [k: string]: Foo; }'.
bluebird/bluebird-tests.ts(534,10): error TS2339: Property 'bar' does not exist on type '{ [k: string]: Bar; }'.
</code></pre></div>
<p dir="auto">Is there any tip for issue like this?</p>