Recursive References in TypeScript
I'm stuck with a very specific TS/JS problem, which may not be solvable but I thought I'd see if anyone here has a cool idea on how to solve it.
So I have a file
Then, in the files that contain the objects, they may refer to each other, e.g. in
Currently with this setup, I get
So I have a file
index.ts with a mapping from some keys to objects:Then, in the files that contain the objects, they may refer to each other, e.g. in
a.ts I may have:Currently with this setup, I get
__WEBPACK_DEFAULT_EXPORT__ and Cannot access 'B' before initialization errors.