<p dir="auto">I have an interface that is supposed to have a function signature of:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(param: {prop: boolean}): any"><pre class="notranslate"><code class="notranslate">(param: {prop: boolean}): any
</code></pre></div>
<p dir="auto">but I forget the parameter name (I'm not sure if this signature is considered valid):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="({prop: boolean}): any"><pre class="notranslate"><code class="notranslate">({prop: boolean}): any
</code></pre></div>
<p dir="auto">When compiling this invalid interface with the <code class="notranslate">--declaration</code> flag, an invalid <code class="notranslate">.d.ts</code> file results:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* foo.ts */
export interface SomeInterface {
    ({prop: boolean}): any
}"><pre class="notranslate"><code class="notranslate">/* foo.ts */
export interface SomeInterface {
    ({prop: boolean}): any
}
</code></pre></div>
<p dir="auto"><code class="notranslate">tsc foo.ts --module commonjs --declaration</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/* foo.d.ts */
export interface SomeInterface {
    ({prop: }: {
        prop: any;
    }): any;
}"><pre class="notranslate"><code class="notranslate">/* foo.d.ts */
export interface SomeInterface {
    ({prop: }: {
        prop: any;
    }): any;
}
</code></pre></div>
<p dir="auto">If parameter names are optional, this should produce a valid <code class="notranslate">.d.ts</code> file. If parameter names are required, <code class="notranslate">tsc</code> should throw an error, or at least warn me that there is an issue.</p>
<p dir="auto">Destructuing is not handled correctly (either object literal or array binding pattern) in during declaration emit.</p>
<p dir="auto">Eg.</p>
<p dir="auto"><code class="notranslate"> TypeScript</code><br>
var { a, b } = { a: "10", b: 10 };</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
Generates

``` TypeScript```
declare var { a, b }: any;"><pre class="notranslate"><code class="notranslate">
Generates

``` TypeScript```
declare var { a, b }: any;
</code></pre></div>
<p dir="auto">Expected:</p>
<p dir="auto"><code class="notranslate"> TypeScript</code><br>
declare var a: string,  b: number;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>