<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="interface Foo {
    readonly foo: string;
}

const foo = {
    get foo(this: Foo): string { // &lt;- A 'get' accessor cannot have parameters.
        return 'foo';
    }
};"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-k">readonly</span> <span class="pl-c1">foo</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<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-k">get</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-smi">this</span>: <span class="pl-smi">Foo</span><span class="pl-kos">)</span>: <span class="pl-smi">string</span> <span class="pl-kos">{</span> <span class="pl-c">// &lt;- A 'get' accessor cannot have parameters.</span>
        <span class="pl-k">return</span> <span class="pl-s">'foo'</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">Ability to type <code class="notranslate">this</code> without errors.</p>
<p dir="auto"><strong>Actual behavior:</strong></p>
<p dir="auto">Errors given when trying to type <code class="notranslate">this</code> in a <code class="notranslate">get</code> accessor.</p>
<p dir="auto">While this example is non-sensical, <code class="notranslate">this</code> typing on other <code class="notranslate">get</code> accessors would be a useful feature and since they are erasable, it isn't like the accessor has an actual parameter.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">Version 1.9.0-dev.20160417</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="// A self-contained demonstration of the problem follows...
let name: string = &quot;hallo&quot;;"><pre class="notranslate"><span class="pl-c">// A self-contained demonstration of the problem follows...</span>
<span class="pl-k">let</span> <span class="pl-s1">name</span>: <span class="pl-smi">string</span> <span class="pl-c1">=</span> <span class="pl-s">"hallo"</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
compile</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
error TS2451: Cannot redeclare block-scoped variable 'name'.</p>