<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const enum Types{ NAME=0, NODE=1 }  
var a: [string, Node];
a[Types.NODE].parentNode; // parentNode does not exists
a[1].parentNode;// that is works fine"><pre class="notranslate"><code class="notranslate">const enum Types{ NAME=0, NODE=1 }  
var a: [string, Node];
a[Types.NODE].parentNode; // parentNode does not exists
a[1].parentNode;// that is works fine
</code></pre></div>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.2</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...
class Repro
{
    static property = {
    foo: &quot;bar&quot;
    };
}"><pre class="notranslate"><span class="pl-c">// A self-contained demonstration of the problem follows...</span>
<span class="pl-k">class</span> <span class="pl-smi">Repro</span>
<span class="pl-kos">{</span>
    <span class="pl-k">static</span> <span class="pl-c1">property</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-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><code class="notranslate">tsc --allowJs --out out.js repro.js</code></p>
<p dir="auto"><strong>Expected behavior:</strong></p>
<p dir="auto">Compiles without error</p>
<p dir="auto"><strong>Actual behavior:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="repro.js(3,5): error TS8014: 'property declarations' can only be used in a .ts file."><pre class="notranslate"><code class="notranslate">repro.js(3,5): error TS8014: 'property declarations' can only be used in a .ts file.
</code></pre></div>