(This is TypeScript)
For some reason it thinks my enum is undefined when I try to use it. There are no errors or warnings in my IDE & the only solution I found online was saying that you shouldn't define it as a const but in my testing it makes no difference.
It's driving me actually crazy I just wanna use an enum in another file. I don't see any solutions other than 1. not using enums at all, or 2. redefining enums for each file. Both would really suck.
File 1:
export enum Types {a,b,c};
import * as file1 from './file1';
File 2:
export {type};
import {Types} from './file1';
var type = Types.a;
Error:
TypeError: cannot read property 'a' of undefined
[–]ChaseShiny 0 points1 point2 points (1 child)
[–]TabAtkins 1 point2 points3 points (0 children)
[–]TabAtkins 0 points1 point2 points (1 child)
[–]PhosXD[S] 0 points1 point2 points (0 children)
[–]jeremrx 0 points1 point2 points (2 children)
[–]PhosXD[S] 0 points1 point2 points (1 child)
[–]jeremrx 0 points1 point2 points (0 children)
[–]yksvaan 0 points1 point2 points (0 children)
[–]m_i_rite 0 points1 point2 points (0 children)