I've got a local typescript project setup in webstorm, using a file watcher with "--out" and "tack only root files" checked.
Also I have a references.ts which contains a reference to every relevant file in the project, which I include in every file.
All seemed to go well at first, but now I'm running into a problem where classes are undefined when I run the code in the browser. The strange thing is, it's a different error (from a different class being undefined) every time, and then occasionally it works.
Then I noticed that the position of a specific class in the output code main.js seems to depend on which .ts file I saved last.
EDIT: in fact, specifically: the file I saved last will also be the last class in the output main.js.
This seems very strange to me, I wonder how this works. Should the output not always get generated starting from main.ts? Or does it indeed somehow start from the last file I save? And if so, how can it be that the output is different when all files have a reference to the same references.ts file?
Anyone any idea?
I'll attach my file watcher settings.
And my file structure looks something like this:
Edit: I also just tested this with main.ts in the rootfolder instead of in "src/", the issue remained.
Attachment(s):typescript filewatcher webstorm.jpg