I'm trying to make a enum to handle country & currency codes.
The enum must be used through entire app (Ionic 3 Angular 4 app).
So far, i found this way:
enum CountryCode {
TH,
BGD,
}
namespace CountryCode {
export function getCurrencyCode(country: CountryCode) {
switch (country) {
case CountryCode.TH:
return 'THB';
case CountryCode.BGD:
return 'BDT';
default:
return 'THB';
}
}
}
however in this case the enum can't be exported to other modules.
How can i solve this problem?