<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.10</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function f(a: { b?: string; c?: number; }){
    // something else
}
f({b: &quot;&quot;}); //  no error as intended
f({b: 1}); //  error as intended
f(1); // expected: error, actually: no error
f(&quot;&quot;); // expected: error, actually: no error"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-s1">a</span>: <span class="pl-kos">{</span> <span class="pl-c1">b</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-c1">c</span>?: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
    <span class="pl-c">// something else</span>
<span class="pl-kos">}</span>
<span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">b</span>: <span class="pl-s">""</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">//  no error as intended</span>
<span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">b</span>: <span class="pl-c1">1</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">//  error as intended</span>
<span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// expected: error, actually: no error</span>
<span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-s">""</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// expected: error, actually: no error</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
see comments in the code.<br>
<strong>Actual behavior:</strong><br>
see comments in the code.</p>
<p dir="auto">This does not work. This is expected since I have <code class="notranslate">"noImplicitAny": true</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function test({ x, y }) {
  console.log(x, y);
}

test({
  x: 1,
  y: 2
});"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">{</span> x<span class="pl-kos">,</span> y <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">x</span><span class="pl-kos">,</span> <span class="pl-s1">y</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
  <span class="pl-c1">x</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
  <span class="pl-c1">y</span>: <span class="pl-c1">2</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><code class="notranslate">src\main.ts(15,17): error TS7005: Variable 'x' implicitly has an 'any' type.</code><br>
<code class="notranslate">src\main.ts(15,20): error TS7005: Variable 'y' implicitly has an 'any' type.</code></p>
<p dir="auto">However, <code class="notranslate">function test({ x:number, y:number }) {</code> does not works too, while <code class="notranslate">function test({ x = 0, y = 0 }) {</code> works fine, but I do not want default params here. Is there a solution for it?</p>