After porting our app to TypeScript I’m trying to share data between windows using that BackgroundController. I used to do that using the main window in native JavaScript.
I’ve added data members to BackgroundController.
Using them from two different windows except that it looks like the data members are optimized out of the BackgroundController for some reason. Worst it looks like I have four declaration of BackgroundController class in the compiled JS output one for each of my windows. So I’m guessing I’m in fact looking at four singletons
Any tips on how to deal with that would be welcome.
Looking at the untouched SampleApp the BackgroundController is not exported and thus not actually used to share data between windows.