Help needed for upgrading code from JavaScript to TypeScript and dealing with circular dependencies.
Directory:
Main.ts
Helper.ts
Main Module:
import Helper from "./Helper"
export default class Main {
helper: Helper
constructor() {
this.helper = new Helper(this);
}
}
Helper (Subordinate) Module:
import Main from "./Main"
export default class Helper {
main: Main;
constructor(main: Main) {
this.main = main;
}
}