<p dir="auto">Could we get Swift's dot notation for enum values?</p>
<p dir="auto">It is very cumbersome to import an enum declaration and having to write them in function calls:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// ABC.ts
export const enum ABC {
  A, 
  B, 
  C,
}

export function testABC(abc: ABC) {
}

// test.ts
import { ABC } from './ABC';
import { testABC } from './ABC';

// it is very cumbersome to import ABC and type ABC.
testABC(ABC.A);"><pre class="notranslate"><span class="pl-c">// ABC.ts</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-k">enum</span> <span class="pl-smi">ABC</span> <span class="pl-kos">{</span>
  <span class="pl-c1">A</span><span class="pl-kos">,</span> 
  <span class="pl-c1">B</span><span class="pl-kos">,</span> 
  <span class="pl-c1">C</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>

<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">testABC</span><span class="pl-kos">(</span><span class="pl-s1">abc</span>: <span class="pl-smi">ABC</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>

<span class="pl-c">// test.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">ABC</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./ABC'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">testABC</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./ABC'</span><span class="pl-kos">;</span>

<span class="pl-c">// it is very cumbersome to import ABC and type ABC.</span>
<span class="pl-en">testABC</span><span class="pl-kos">(</span><span class="pl-smi">ABC</span><span class="pl-kos">.</span><span class="pl-c1">A</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Swift introduced the most laziest way to write them. It would be good if TS could support it also.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// test.ts
import { testABC } from './ABC';
testABC(.A);"><pre class="notranslate"><span class="pl-c">// test.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">testABC</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./ABC'</span><span class="pl-kos">;</span>
<span class="pl-en">testABC</span><span class="pl-kos">(</span><span class="pl-kos">.</span><span class="pl-smi">A</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Here is an another example with a switch statement, where you don't need to write <code class="notranslate">ABC</code> on every case:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { ABC } from './ABC';
let abc: ABC;
switch (abc) {
   case .A:
        break;
   case .B:
        break;
   case .C:
        break;
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">ABC</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./ABC'</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">abc</span>: <span class="pl-smi">ABC</span><span class="pl-kos">;</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">abc</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
   <span class="pl-k">case</span> <span class="pl-kos">.</span><span class="pl-smi">A</span>:
        <span class="pl-k">break</span><span class="pl-kos">;</span>
   <span class="pl-k">case</span> <span class="pl-kos">.</span><span class="pl-smi">B</span>:
        <span class="pl-k">break</span><span class="pl-kos">;</span>
   <span class="pl-k">case</span> <span class="pl-kos">.</span><span class="pl-smi">C</span>:
        <span class="pl-k">break</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Porting over this issue from:<a href="http://typescript.codeplex.com/workitem/260" rel="nofollow">http://typescript.codeplex.com/workitem/260</a>.</p>
<p dir="auto">This is a request to add support for get/set accessors in interfaces.  This would allow the interface to define the ability of the interface.  For example, in the case where the property is read-only, "get" keyword in the interface would indicate that the property is read-only.</p>