I have the following setup:
tsconfig.json
{
"compileOnSave": true,
"compilerOptions": {
"module": "none",
"outFile": "js/app.js"
}
}
MyApp.Main.ts
class Main
{
constructor()
{
Utilities.init(this);
}
// Other methods
}
MyApp.Utilities.ts
class Utilities
{
static init(app: Main)
{
// Do something with app...
}
// Other methods
}
When I either save the .ts file or recompile the project, I do not have an app.js
file as specified in the outFile
option, I only get MyApp.Main.js
and MyApp.Utilities.js
compiled files.
I have also tried adding /// <reference ... />
paths to my "Main" class, and that also does not cause outputs to be combined.
Some notes:
- I can't target a newer ES version because I need to support IE without a shim.
- Similarly, I cannot use a module system because I am not allowed to introduce an additional dependency into the project, so the module must be "none".
- I can't run the code through an additional compiler such as Babel.
Basically, I need to get this to work with pure TypeScript, no module system, and no (default) ES target.
What am I doing wrong that the outputs are not being combined into a single .js file?