Within my typings file, I have the following:
declare namespace Somatic {
enum PropType {
html,
object,
css
}
}
In a separate file named index.ts, I create a shorter alias for this enum like so:
type PropType = Somatic.PropType;
Afterwards, I attempt to utilize the aliased enum type within a switch statement :
switch (propType) {
case PropType.html:
break;
.
.
.
}
However, Typescript fails to recognize the values of the aliased enum type. What could be causing this issue?