Typescript type alias for enum
<p>I have this in my typings file:</p>

<pre><code>declare namespace Somatic {
    enum PropType {
        html,
        object,
        css
    }
}
</code></pre>

<p>In another file index.ts, I have a shorter alias for this enum as:</p>

<pre><code>type PropType = Somatic.PropType;
</code></pre>

<p>Then I want to use the aliased enum type in a switch statement:</p>

<pre><code>switch (propType) {
    case PropType.html:
        break;
    .
    .
    .
    }
</code></pre>

<p>But Typescript does not recognize the aliased enum type values. What is wrong here?</p>