In the file models.ts
, I have defined the following enum:
export enum REPORTTYPE {
CUSTOMER, EMPLOYEE, PROJECT
}
After defining it, I use this enum inside another class like so:
console.log(REPORTTYPE.CUSTOMER);
When I save the file, the IDE automatically imports the enum along with other classes/interfaces from models.ts
:
import {REPORTTYPE, ...more} from '../../../_models';
Everything appears to be working correctly in the IDE as it suggests me the correct autocompletions. However, when I try to compile the code, I encounter the following error:
ERROR in ./classpath... 59:20-30
"export 'REPORTTYPE' was not found in '../../../_models'
All other imports from models.ts
are compiling and functioning properly. It seems that for some reason, the compiler is unable to find REPORTTYPE
even though it is declared as an exported enum and recognized correctly by the IDE.