Within file A, I have defined the following enum:
export enum MyFluffyEnum { Beauty, Courage, Love }
In another file B, I import this enum from file A like so:
import { MyFluffyEnum } from "./A";
export type { MyFluffyEnum };
Then in file C, I attempt to import MyFluffyEnum from file B:
import { MyFluffyEnum } from "./B";
This results in a compile-time error:
'MyFluffyEnum' cannot be used as a value because it was exported using 'export type'.
If I try to resolve this by adding export { MyFluffyEnum };
in file B, I encounter the error "Module not found: Can't resolve 'B.tsx' in 'my-project/path/here'".
However, importing the file with the enum as a named export directly eliminates the error.
For further reference, these links may be useful:
Export enum from user defined typescript path result in Module not found
https://github.com/dividab/tsconfig-paths-webpack-plugin/issues/78