<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">nightly (1.9.0-dev.20160429)</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="const foo = {
    _foo: 'bar',
    get foo() { // &lt;- 'foo' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
        return this._foo;
    },
    set foo(value) { // &lt;- 'value' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
        this._foo = value;
    }
};"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
    <span class="pl-c1">_foo</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span>
    <span class="pl-k">get</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// &lt;- 'foo' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.</span>
        <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">_foo</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-k">set</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// &lt;- 'value' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.</span>
        <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">_foo</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<p dir="auto">No errors.</p>
<p dir="auto"><strong>Actual behavior:</strong></p>
<p dir="auto">With the compiler option <code class="notranslate">noImplicitAny = true</code> and inferred object literal typing, the compiler is complaining that <code class="notranslate">get</code> and <code class="notranslate">set</code> accessors have inferred <code class="notranslate">any</code> types, when though it is logical that the type of <code class="notranslate">string</code> can be inferred from the context (or at least I am missing the reason why it cannot be inferred).</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.9<br>
<strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Window {
    URL;
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Window</span> <span class="pl-kos">{</span>
    <span class="pl-c1">URL</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Actual behavior:</strong></p>
<p dir="auto">When upgrading typescript versions, new definitions were added to lib.d.ts, and these new definitions cause conflicts with definitions we had in our project.</p>
<p dir="auto">This makes it annoying to upgrade typescript since we have to introduce a change to the code that breaks anyone using an old compiler.</p>
<p dir="auto"><strong>Expected behavior:</strong><br>
Typescript would merge the types in my project definitions with lib.d.ts without complaint.</p>