Typescript type alias for enum
You should use import
keyword instead of type
:
import PropType = Somatic.PropType;
More info on import alias declarations here.
** This syntax won't work if you're using babel-plugin-transform-typescript because this is typescript only form of import. Generally using namespaces is not recommended.
In typescript, an enum is both a type and a map. You should alias the type and the map separately:
type PropTypeEnum = Somatic.PropType;
const PropType = Somatic.PropType;