<p dir="auto">Property <code class="notranslate">event</code> in global object Window is <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/event" rel="nofollow">non-standard</a> and must be removed from lib.d.ts because of possible errors in browsers that follow the standard (Mozilla Firefox, for example).</p>
<p dir="auto">It's also an ability for potential wrong behavior in code (example below).</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.7.5 / current Git code.</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 someHandler( event: Event, additionalData: number ): void
{
    console.log( event, additionalData );
}

const onClick = (): void =&gt; someHandler( event, 1 ); // &lt;-- forgot the argument `event`

element.addEventListener( 'click', onClick );"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">someHandler</span><span class="pl-kos">(</span> <span class="pl-s1">event</span>: <span class="pl-smi">Event</span><span class="pl-kos">,</span> <span class="pl-s1">additionalData</span>: <span class="pl-smi">number</span> <span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></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">event</span><span class="pl-kos">,</span> <span class="pl-s1">additionalData</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">const</span> <span class="pl-en">onClick</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-c1">=&gt;</span> <span class="pl-en">someHandler</span><span class="pl-kos">(</span> <span class="pl-s1">event</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">// &lt;-- forgot the argument `event`</span>

<span class="pl-s1">element</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span> <span class="pl-s">'click'</span><span class="pl-kos">,</span> <span class="pl-s1">onClick</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<p dir="auto">Error — <code class="notranslate">event</code> is not defined.</p>
<p dir="auto"><strong>Actual behavior:</strong></p>
<p dir="auto">Silence but code may work incorrectly and didn't work in some browsers.</p>
<p dir="auto">The example below compiles - it shouldn't, I think...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ttsiod@avalon /home/ttsiod/tmp/TypeScript.bug
$  cat foo.ts
function whyTSwhy(config: {
    name?:string
})
{
    console.log(config.name);
    console.log(name);
}

ttsiod@avalon /home/ttsiod/tmp/TypeScript.bug
$  tsc -t ES5 foo.ts 
$"><pre class="notranslate"><code class="notranslate">ttsiod@avalon /home/ttsiod/tmp/TypeScript.bug
$  cat foo.ts
function whyTSwhy(config: {
    name?:string
})
{
    console.log(config.name);
    console.log(name);
}

ttsiod@avalon /home/ttsiod/tmp/TypeScript.bug
$  tsc -t ES5 foo.ts 
$
</code></pre></div>
<p dir="auto">Typescript fails to see that there is no "name" variable - only "config.name" is valid in this context.</p>
<p dir="auto">I am using the version from the repos, commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/TypeScript/commit/af4a12151c7f1b0cfe6b913d7c092b825cf4f641/hovercard" href="https://github.com/microsoft/TypeScript/commit/af4a12151c7f1b0cfe6b913d7c092b825cf4f641"><tt>af4a121</tt></a> .</p>