I'm using TypeLITE for creating some Typescript enums from my C# code. The output is something like this:
namespace Test.BL.Enums {
export enum DayShift {
PreviousDay = -1,
CurrentDay = 0,
NextDay = 1
}
}
I came to the understanding this contructs are called 'internal modules' (if i'm right).
So I import the namespace in some other file like:
import Enums = Test.BL.Enums;
In design time this doesn't give any errors, but when i'm building my Typescript using the awesome-typescript-loader with Webpack the enums are not included. And so I get an error on this when running the (Angular 2) application.
Is there a way to fix this problem? maybe disabling namespace generation in Typelite?
I also found this issue on github:
https://github.com/s-panferov/awesome-typescript-loader/issues/246
preserveConstEnums
? And have you triedts-loader
to see if there's a difference in behavior?