<p dir="auto">Consider:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Apple {
    private size: number;

    constructor(size: number) {
        this.size = size;
    }

    get Size(): number {
        return this.size;
    }
}

let a: Apple = new Apple(4);
console.log(a.Size);
a.Size = 5; // should this should throw a compile time error?"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Apple</span> <span class="pl-kos">{</span>
    <span class="pl-k">private</span> <span class="pl-c1">size</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span>

    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">size</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">size</span> <span class="pl-c1">=</span> <span class="pl-s1">size</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-k">get</span> <span class="pl-en">Size</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span> <span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">size</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">let</span> <span class="pl-s1">a</span>: <span class="pl-smi">Apple</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Apple</span><span class="pl-kos">(</span><span class="pl-c1">4</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">a</span><span class="pl-kos">.</span><span class="pl-c1">Size</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-c1">Size</span> <span class="pl-c1">=</span> <span class="pl-c1">5</span><span class="pl-kos">;</span> <span class="pl-c">// should this should throw a compile time error?</span></pre></div>
<p dir="auto">It strikes me that the attempted assignment to <code class="notranslate">a.Size</code> should produce a compile time error.</p>
<p dir="auto">Instead we learn about it at runtime (target <code class="notranslate">es6</code> with <code class="notranslate">v1.6.0-dev.20150806</code>)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Error: Cannot set property Size of #&lt;Apple&gt; which has only a getter]"><pre class="notranslate"><code class="notranslate">[Error: Cannot set property Size of #&lt;Apple&gt; which has only a getter]
</code></pre></div>
<p dir="auto">Thoughts?</p>
<p dir="auto">If a property has a getter but no setter (or vice versa) than perhaps the attempt to set or get should be flagged as an error:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Fields{
    get ReadOnly(){
        return 10;
    }

    public written:number;
    set WriteOnly(value:number){
        this.written = value; 
    }
}

var obj = new Fields();

console.log(obj.ReadOnly); // 10
obj.ReadOnly = 20;  // cannot set but no error 
console.log(obj.ReadOnly) // 10 

obj.WriteOnly = 20; 
console.log(obj.written) // 20 
console.log(obj.WriteOnly); // cannot read but no error "><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Fields</span><span class="pl-kos">{</span>
    <span class="pl-k">get</span> <span class="pl-en">ReadOnly</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-c1">10</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-k">public</span> <span class="pl-c1">written</span>:<span class="pl-smi">number</span><span class="pl-kos">;</span>
    <span class="pl-k">set</span> <span class="pl-en">WriteOnly</span><span class="pl-kos">(</span><span class="pl-s1">value</span>:<span class="pl-smi">number</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
        <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">written</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-k">var</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Fields</span><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">obj</span><span class="pl-kos">.</span><span class="pl-c1">ReadOnly</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// 10</span>
<span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">ReadOnly</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span><span class="pl-kos">;</span>  <span class="pl-c">// cannot set but no error </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">obj</span><span class="pl-kos">.</span><span class="pl-c1">ReadOnly</span><span class="pl-kos">)</span> <span class="pl-c">// 10 </span>

<span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">WriteOnly</span> <span class="pl-c1">=</span> <span class="pl-c1">20</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">obj</span><span class="pl-kos">.</span><span class="pl-c1">written</span><span class="pl-kos">)</span> <span class="pl-c">// 20 </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">obj</span><span class="pl-kos">.</span><span class="pl-c1">WriteOnly</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// cannot read but no error </span></pre></div>
<p dir="auto">No biggie. But something to be aware of. (ported from <a href="http://typescript.codeplex.com/workitem/834" rel="nofollow">http://typescript.codeplex.com/workitem/834</a>)</p>